diff --git a/jetty-websocket/websocket-core/src/test/java/org/eclipse/jetty/websocket/asserts/CloseFrameAssert.java b/jetty-websocket/websocket-core/src/test/java/org/eclipse/jetty/websocket/asserts/CloseFrameAssert.java new file mode 100644 index 00000000000..96eeceabf98 --- /dev/null +++ b/jetty-websocket/websocket-core/src/test/java/org/eclipse/jetty/websocket/asserts/CloseFrameAssert.java @@ -0,0 +1,16 @@ +package org.eclipse.jetty.websocket.asserts; + +import junit.framework.Assert; + +import org.eclipse.jetty.websocket.api.OpCode; +import org.eclipse.jetty.websocket.frames.CloseFrame; + +public class CloseFrameAssert +{ + + public static void assertValidCloseFrame( CloseFrame close ) + { + Assert.assertEquals(OpCode.CLOSE, close.getOpCode() ); + } + +} diff --git a/jetty-websocket/websocket-core/src/test/java/org/eclipse/jetty/websocket/generator/CloseFrameGeneratorTest.java b/jetty-websocket/websocket-core/src/test/java/org/eclipse/jetty/websocket/generator/CloseFrameGeneratorTest.java new file mode 100644 index 00000000000..a1d1550d535 --- /dev/null +++ b/jetty-websocket/websocket-core/src/test/java/org/eclipse/jetty/websocket/generator/CloseFrameGeneratorTest.java @@ -0,0 +1,17 @@ +package org.eclipse.jetty.websocket.generator; + +import org.eclipse.jetty.websocket.asserts.CloseFrameAssert; +import org.eclipse.jetty.websocket.frames.CloseFrame; +import org.junit.Test; + +public class CloseFrameGeneratorTest +{ + @Test + public void testGenerator() throws Exception + { + CloseFrame close = new CloseFrame(); + + CloseFrameAssert.assertValidCloseFrame(close); + } + +}