[Cherbot-commit] SF.net SVN: cherbot:[146] trunk
Status: Alpha
Brought to you by:
christianhujer
|
From: <chr...@us...> - 2008-12-14 23:22:09
|
Revision: 146
http://cherbot.svn.sourceforge.net/cherbot/?rev=146&view=rev
Author: christianhujer
Date: 2008-12-14 22:05:51 +0000 (Sun, 14 Dec 2008)
Log Message:
-----------
Fixed implementation of SPI so it passes JUnit tests in IntelliJ IDEA and Ant.
Modified Paths:
--------------
trunk/build.xml
trunk/cherbot.iml
trunk/cherbot.ipr
trunk/src/prj/net/sf/cherbot/connection/CrossfireConnectionFactory.java
trunk/src/prj/net/sf/cherbot/connection/DaimoninConnectionFactory.java
trunk/src/prj/net/sf/cherbot/connection/IRCConnectionFactory.java
Added Paths:
-----------
trunk/src/prj/META-INF/services/
trunk/src/prj/META-INF/services/net.sf.cherbot.connection.ConnectionFactory
trunk/src/tst/test/net/sf/cherbot/connection/
trunk/src/tst/test/net/sf/cherbot/connection/ConnectionProviderTest.java
Removed Paths:
-------------
trunk/src/prj/META-INF/net.sf.cherbot.connection.ConnectionFactory
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2008-12-14 20:16:36 UTC (rev 145)
+++ trunk/build.xml 2008-12-14 22:05:51 UTC (rev 146)
@@ -29,7 +29,7 @@
<javac
source = "1.5"
target = "1.5"
- srcdir = "src"
+ srcdir = "src/prj"
destdir = "classes"
debug = "yes"
encoding = "utf-8"
@@ -44,7 +44,7 @@
<compilerarg line="-Xmaxwarns 4000"/>
</javac>
<copy todir="classes">
- <fileset dir="src">
+ <fileset dir="src/prj">
<include name="**/*.properties"/>
<include name="META-INF/**"/>
</fileset>
@@ -137,22 +137,40 @@
depends = "createJar"
>
<mkdir dir="tests" />
+ <javac
+ source = "1.5"
+ target = "1.5"
+ srcdir = "src/tst"
+ destdir = "classes"
+ debug = "yes"
+ encoding = "utf-8"
+ >
+ <classpath>
+ <pathelement location="lib/annotations.jar" />
+ <pathelement location="lib/junit-4.1.jar" />
+ <pathelement location="lib/japi-lib-argparser-0.1.jar" />
+ </classpath>
+ <compilerarg line="-Xlint:all"/>
+ <compilerarg line="-Xmaxerrs 400"/>
+ <compilerarg line="-Xmaxwarns 4000"/>
+ </javac>
<junit
fork = "no"
printsummary="yes"
haltonfailure="yes"
>
<formatter type="plain" usefile="no"/>
+ <formatter type="xml"/>
<classpath>
<pathelement path="CherBot.jar" />
+ <pathelement path="lib/junit-4.1.jar" />
</classpath>
- <test
- name="net.sf.cherbot.ExampleTester"
- todir="tests"
- >
- <formatter type="plain"/>
- <formatter type="xml"/>
- </test>
+ <batchtest todir="tests">
+ <fileset dir="src/tst">
+ <include name="**/*Test.java" />
+ <exclude name="**/Abstract*Test.java" />
+ </fileset>
+ </batchtest>
</junit>
</target>
Modified: trunk/cherbot.iml
===================================================================
--- trunk/cherbot.iml 2008-12-14 20:16:36 UTC (rev 145)
+++ trunk/cherbot.iml 2008-12-14 22:05:51 UTC (rev 146)
@@ -38,7 +38,6 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="library" name="derby" level="project" />
<orderEntryProperties />
</component>
<component name="copyright">
Modified: trunk/cherbot.ipr
===================================================================
--- trunk/cherbot.ipr 2008-12-14 20:16:36 UTC (rev 145)
+++ trunk/cherbot.ipr 2008-12-14 22:05:51 UTC (rev 146)
@@ -82,6 +82,7 @@
<entry name="?*.png" />
<entry name="?*.jpeg" />
<entry name="?*.jpg" />
+ <entry name="?*Factory" />
</wildcardResourcePatterns>
</component>
<component name="CppTools.Loader" warnedAboutFileOutOfSourceRoot="true" />
@@ -1121,13 +1122,6 @@
<JAVADOC />
<SOURCES />
</library>
- <library name="derby">
- <CLASSES>
- <root url="jar://$PROJECT_DIR$/../../../Documents/Downloads/jdk1.6.0_01/db/lib/derby.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
</component>
</project>
Deleted: trunk/src/prj/META-INF/net.sf.cherbot.connection.ConnectionFactory
===================================================================
--- trunk/src/prj/META-INF/net.sf.cherbot.connection.ConnectionFactory 2008-12-14 20:16:36 UTC (rev 145)
+++ trunk/src/prj/META-INF/net.sf.cherbot.connection.ConnectionFactory 2008-12-14 22:05:51 UTC (rev 146)
@@ -1,4 +0,0 @@
-net.sf.cherbot.ConsoleConncectionFactory
-net.sf.cherbot.CrossfireConncectionFactory
-net.sf.cherbot.DaimoninConncectionFactory
-net.sf.cherbot.IRCConncectionFactory
Copied: trunk/src/prj/META-INF/services/net.sf.cherbot.connection.ConnectionFactory (from rev 142, trunk/src/prj/META-INF/net.sf.cherbot.connection.ConnectionFactory)
===================================================================
--- trunk/src/prj/META-INF/services/net.sf.cherbot.connection.ConnectionFactory (rev 0)
+++ trunk/src/prj/META-INF/services/net.sf.cherbot.connection.ConnectionFactory 2008-12-14 22:05:51 UTC (rev 146)
@@ -0,0 +1,4 @@
+net.sf.cherbot.connection.ConsoleConnectionFactory
+net.sf.cherbot.connection.CrossfireConnectionFactory
+net.sf.cherbot.connection.DaimoninConnectionFactory
+net.sf.cherbot.connection.IRCConnectionFactory
Property changes on: trunk/src/prj/META-INF/services/net.sf.cherbot.connection.ConnectionFactory
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Modified: trunk/src/prj/net/sf/cherbot/connection/CrossfireConnectionFactory.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/CrossfireConnectionFactory.java 2008-12-14 20:16:36 UTC (rev 145)
+++ trunk/src/prj/net/sf/cherbot/connection/CrossfireConnectionFactory.java 2008-12-14 22:05:51 UTC (rev 146)
@@ -10,7 +10,7 @@
/** Service Constructor.
* @see java.util.ServiceLoader
*/
- protected CrossfireConnectionFactory() {
+ public CrossfireConnectionFactory() {
super("crossfire");
}
Modified: trunk/src/prj/net/sf/cherbot/connection/DaimoninConnectionFactory.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/DaimoninConnectionFactory.java 2008-12-14 20:16:36 UTC (rev 145)
+++ trunk/src/prj/net/sf/cherbot/connection/DaimoninConnectionFactory.java 2008-12-14 22:05:51 UTC (rev 146)
@@ -10,7 +10,7 @@
/** Service Constructor.
* @see java.util.ServiceLoader
*/
- protected DaimoninConnectionFactory() {
+ public DaimoninConnectionFactory() {
super("daimonin");
}
Modified: trunk/src/prj/net/sf/cherbot/connection/IRCConnectionFactory.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/IRCConnectionFactory.java 2008-12-14 20:16:36 UTC (rev 145)
+++ trunk/src/prj/net/sf/cherbot/connection/IRCConnectionFactory.java 2008-12-14 22:05:51 UTC (rev 146)
@@ -10,7 +10,7 @@
/** Service Constructor.
* @see java.util.ServiceLoader
*/
- protected IRCConnectionFactory() {
+ public IRCConnectionFactory() {
super("irc");
}
Added: trunk/src/tst/test/net/sf/cherbot/connection/ConnectionProviderTest.java
===================================================================
--- trunk/src/tst/test/net/sf/cherbot/connection/ConnectionProviderTest.java (rev 0)
+++ trunk/src/tst/test/net/sf/cherbot/connection/ConnectionProviderTest.java 2008-12-14 22:05:51 UTC (rev 146)
@@ -0,0 +1,27 @@
+package test.net.sf.cherbot.connection;
+
+import org.junit.Test;
+import net.sf.cherbot.connection.Connection;
+import net.sf.cherbot.connection.ConnectionProvider;
+import net.sf.cherbot.connection.UnknownConnectionTypeException;
+
+/**
+ * TODO
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public class ConnectionProviderTest {
+
+ @Test public void testFoo() throws UnknownConnectionTypeException {
+ Connection con;
+ con = ConnectionProvider.getConnection("console");
+ con = ConnectionProvider.getConnection("crossfire");
+ con = ConnectionProvider.getConnection("daimonin");
+ con = ConnectionProvider.getConnection("irc");
+ }
+
+ @Test(expected = UnknownConnectionTypeException.class)
+ public void test2() throws UnknownConnectionTypeException {
+ Connection con;
+ con = ConnectionProvider.getConnection("foo");
+ }
+}
Property changes on: trunk/src/tst/test/net/sf/cherbot/connection/ConnectionProviderTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|