Ver código fonte

Remade directory structure and added simple tests

Tankernn 9 anos atrás
pai
commit
005e5ac918

+ 3 - 1
.classpath

@@ -1,6 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="src/main/java"/>
+	<classpathentry kind="src" path="src/test/java"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>

+ 0 - 0
src/client/ChatClient.java → src/main/java/client/ChatClient.java


+ 0 - 0
src/client/ChatWindow.java → src/main/java/client/ChatWindow.java


+ 0 - 0
src/client/Console.java → src/main/java/client/Console.java


+ 0 - 0
src/command/Ban.java → src/main/java/command/Ban.java


+ 0 - 0
src/command/Command.java → src/main/java/command/Command.java


+ 0 - 0
src/command/CreateChannel.java → src/main/java/command/CreateChannel.java


+ 0 - 0
src/command/Exit.java → src/main/java/command/Exit.java


+ 0 - 0
src/command/Help.java → src/main/java/command/Help.java


+ 0 - 0
src/command/JoinChannel.java → src/main/java/command/JoinChannel.java


+ 0 - 0
src/command/Kick.java → src/main/java/command/Kick.java


+ 0 - 0
src/command/LeaveChannel.java → src/main/java/command/LeaveChannel.java


+ 0 - 0
src/command/List.java → src/main/java/command/List.java


+ 0 - 0
src/command/PrivateMessage.java → src/main/java/command/PrivateMessage.java


+ 0 - 0
src/common/Message.java → src/main/java/common/Message.java


+ 0 - 0
src/server/BanNote.java → src/main/java/server/BanNote.java


+ 0 - 0
src/server/Channel.java → src/main/java/server/Channel.java


+ 0 - 0
src/server/Client.java → src/main/java/server/Client.java


+ 0 - 0
src/server/ClientCollection.java → src/main/java/server/ClientCollection.java


+ 0 - 0
src/server/CommandHandler.java → src/main/java/server/CommandHandler.java


+ 0 - 0
src/server/LocalClient.java → src/main/java/server/LocalClient.java


+ 0 - 0
src/server/Logger.java → src/main/java/server/Logger.java


+ 0 - 0
src/server/Pong.java → src/main/java/server/Pong.java


+ 1 - 1
src/server/Server.java → src/main/java/server/Server.java

@@ -162,7 +162,7 @@ public class Server {
 	}
 	
 	static void newPropertiesFile() {
-		System.out.println("Generating new preperties file.");
+		System.out.println("Generating new properties file.");
 		try {
 			new File("server.properties").createNewFile();
 			prop.setProperty("port", "25566");

+ 19 - 0
src/test/java/server/ServerTest.java

@@ -0,0 +1,19 @@
+package server;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class ServerTest {
+	
+	@Test
+	public void testCInt() {
+		assertEquals(Server.CInt("832"), 832);
+	}
+	
+	@Test
+	public void testStart() {
+		Server.main(new String[]{});
+	}
+
+}