Skip to content

Commit e59a0bb

Browse files
authored
Merge pull request TooTallNate#772 from marci4/CloseFrameToString
Fix tests
2 parents e7226c0 + 0530862 commit e59a0bb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/test/java/org/java_websocket/autobahn/AutobahnServerResults.java renamed to src/test/java/org/java_websocket/autobahn/AutobahnServerResultsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
import static org.junit.Assert.assertEquals;
3838

39-
public class AutobahnServerResults {
39+
public class AutobahnServerResultsTest {
4040

4141
static JSONObject jsonObject = null;
4242

src/test/java/org/java_websocket/framing/CloseFrameTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ public void testExtends() {
6363
@Test
6464
public void testToString() {
6565
CloseFrame frame = new CloseFrame();
66-
assertEquals("Frame toString must include a close code", "Framedata{ optcode:CLOSING, fin:true, rsv1:false, rsv2:false, rsv3:false, payloadlength:[pos:0, len:2], payload:\u0003è}code: 1000",frame.toString());
66+
String frameString = frame.toString();
67+
frameString = frameString.replaceAll("payload:(.*)}", "payload: *}");
68+
assertEquals("Frame toString must include a close code", "Framedata{ optcode:CLOSING, fin:true, rsv1:false, rsv2:false, rsv3:false, payloadlength:[pos:0, len:2], payload: *}code: 1000", frameString);
6769
}
6870

6971

0 commit comments

Comments
 (0)