add simple test example

This commit is contained in:
Jesse McConnell 2012-06-18 16:30:19 -05:00
parent a4a5108da4
commit d8893b4823
2 changed files with 33 additions and 0 deletions

View File

@ -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() );
}
}

View File

@ -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);
}
}