23 package com.realtime.crossfire.jxclient.server.crossfire;
27 import java.io.IOException;
28 import org.junit.Assert;
29 import org.junit.Test;
35 @SuppressWarnings({
"OverlyBroadThrowsClause",
"JavaDoc"})
45 @Test(timeout = 30000)
46 public
void testNegotiateNumLookObjects1() throws Exception {
75 @Test(timeout = 30000)
76 public
void test_statsMessage_callsPacketWatcherCallback() throws Exception {
88 final StringBuilder sb =
new StringBuilder();
89 connection.
addPacketWatcherListener((command, args) -> sb.append(command).append(
"/").append(args.getMonitorCommand()).append(
"\n"));
92 Assert.assertEquals(
"stats/hp 258\n", sb.toString());
103 @Test(timeout = 30000)
104 public
void test_mapUpdates_suppressInitialMapScroll() throws Exception {
118 server.
writeBytes(
new byte[]{
'n',
'e',
'w',
'm',
'a',
'p'});
119 server.
writeBytes(
new byte[]{
'm',
'a',
'p',
'2',
' ', 0x3C, (byte)0xE1,});
120 server.
writeBytes(
new byte[]{
'm',
'a',
'p',
'2',
' ', 0x3C, (byte)0xE1,});
123 Assert.assertEquals(
""+
160 Assert.assertEquals(
""+
161 "drawextinfo 1 2 3 message\n"+