1 18 package net.sf.drftpd.event.irc; 19 20 import java.io.IOException ; 21 import java.net.UnknownHostException ; 22 import java.util.ArrayList ; 23 24 import junit.framework.TestCase; 25 import junit.framework.TestSuite; 26 27 import org.drftpd.tests.DummyUser; 28 29 33 public class StatsTest extends TestCase { 34 35 38 public StatsTest(String fName) { 39 super(fName); 40 } 41 42 public static TestSuite suite() { 43 return new TestSuite(StatsTest.class); 44 } 45 46 public void testStats() throws UnknownHostException , IOException { 47 ArrayList users = new ArrayList (); 48 users.add(new DummyUser("user1")); 49 users.add(new DummyUser("user2")); 50 users.add(new DummyUser("user3")); 51 assertEquals(Stats.fixNumberAndUserlist("!alup 2",users),2); 52 assertEquals(3,users.size()); 53 assertEquals(2,Stats.fixNumberAndUserlist("!alup 2 !-user1 *",users)); 54 assertEquals(2,users.size()); 55 } 56 } 57 | Popular Tags |