mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
re-implemented existing functionality in UI
- Correct player count is shown in server list - Servers now advertise their capacity and number of players connected - Players can click join on the servers in the server list - Direct connect works - Can set max players / server name in host dialog - Server starts correctly when host clicked - Implemented boat customization - Implemented 'begin race button', and disabled it for players that aren't hosts - Added countdown timer in lobby - Fixed bug where app wouldn't close Tags: #story[1245]
This commit is contained in:
@@ -8,40 +8,40 @@ import static org.junit.Assert.assertTrue;
|
||||
public class TestServerDesc {
|
||||
@Test
|
||||
public void testEquals(){
|
||||
ServerDescription one = new ServerDescription("a", "b", 10, "asd", 1234);
|
||||
ServerDescription two = new ServerDescription("a", "b", 10, "asd", 1234);
|
||||
ServerDescription one = new ServerDescription("a", "b", 10, 10, "asd", 1234);
|
||||
ServerDescription two = new ServerDescription("a", "b", 10, 10, "asd", 1234);
|
||||
|
||||
assertTrue(one.equals(two));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNotEqualName(){
|
||||
ServerDescription one = new ServerDescription("a", "b", 10, "asd", 1234);
|
||||
ServerDescription two = new ServerDescription("a2", "b", 10, "asd", 1234);
|
||||
ServerDescription one = new ServerDescription("a", "b", 10, 10, "asd", 1234);
|
||||
ServerDescription two = new ServerDescription("a2", "b", 10, 10, "asd", 1234);
|
||||
|
||||
assertTrue(!one.equals(two));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNotEqualMap(){
|
||||
ServerDescription one = new ServerDescription("a", "b", 10, "asd", 1234);
|
||||
ServerDescription two = new ServerDescription("a", "ba", 10, "asd", 1234);
|
||||
ServerDescription one = new ServerDescription("a", "b", 10, 10, "asd", 1234);
|
||||
ServerDescription two = new ServerDescription("a", "ba", 10, 10, "asd", 1234);
|
||||
|
||||
assertTrue(!one.equals(two));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNotEqualPort(){
|
||||
ServerDescription one = new ServerDescription("a", "b", 10, "asd", 1234);
|
||||
ServerDescription two = new ServerDescription("a", "b", 10, "asd", 12341);
|
||||
ServerDescription one = new ServerDescription("a", "b", 10, 10, "asd", 1234);
|
||||
ServerDescription two = new ServerDescription("a", "b", 10, 10, "asd", 12341);
|
||||
|
||||
assertTrue(!one.equals(two));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNotEqualAddress(){
|
||||
ServerDescription one = new ServerDescription("a", "b", 10, "as1d", 1234);
|
||||
ServerDescription two = new ServerDescription("a", "b", 10, "asd", 1234);
|
||||
ServerDescription one = new ServerDescription("a", "b", 10, 10, "as1d", 1234);
|
||||
ServerDescription two = new ServerDescription("a", "b", 10, 10, "asd", 1234);
|
||||
|
||||
assertTrue(!one.equals(two));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user