12
12
import javax .websocket .DeploymentException ;
13
13
import javax .websocket .WebSocketContainer ;
14
14
15
- import org .javaee7 .websocket .binary .MyEndpoint ;
15
+ import org .javaee7 .websocket .binary .MyEndpointByteArray ;
16
+ import org .javaee7 .websocket .binary .MyEndpointByteBuffer ;
16
17
import org .javaee7 .websocket .binary .MyEndpointClient ;
18
+ import org .javaee7 .websocket .binary .MyEndpointInputStream ;
17
19
import org .jboss .arquillian .container .test .api .Deployment ;
18
20
import org .jboss .arquillian .container .test .api .TargetsContainer ;
19
21
import org .jboss .arquillian .junit .Arquillian ;
27
29
*
28
30
*/
29
31
@ RunWith (Arquillian .class )
30
- public class WebsocketBinaryEndpointTest {
32
+ public class WebsocketByteBufferEndpointTest {
31
33
private static final String WEBAPP_SRC = "src/main/webapp" ;
32
34
33
35
/**
@@ -37,21 +39,23 @@ public class WebsocketBinaryEndpointTest {
37
39
@ Deployment (testable = false ) @ TargetsContainer ("wildfly-arquillian" )
38
40
public static WebArchive createDeployment (){
39
41
WebArchive war = ShrinkWrap .create (WebArchive .class ).
40
- addClass (MyEndpoint .class ).
42
+ addClass (MyEndpointByteBuffer .class ).
43
+ addClass (MyEndpointByteArray .class ).
44
+ addClass (MyEndpointInputStream .class ).
41
45
addAsWebResource (new File (WEBAPP_SRC ,"index.jsp" )).
42
46
addAsWebResource (new File (WEBAPP_SRC ,"websocket.js" ));
43
47
return war ;
44
48
}
45
49
46
50
/**
47
- * The basic test method for the class {@link MyEndpoint }
51
+ * The basic test method for the class {@link MyEndpointByteBuffer }
48
52
* @throws URISyntaxException
49
53
* @throws DeploymentException
50
54
* @throws IOException
51
55
*/
52
56
@ Test
53
- public void testEndPointBinary () throws URISyntaxException , DeploymentException ,IOException {
54
- WebSocketContainer socketContainer = ContainerProvider .getWebSocketContainer ();
55
- socketContainer .connectToServer (MyEndpointClient .class , new URI ("ws://localhost:8080/binary/websockeet" ));
57
+ public void testEndPointByteBuffer () throws URISyntaxException , DeploymentException ,IOException {
58
+ WebSocketContainer wSocketContainer = ContainerProvider .getWebSocketContainer ();
59
+ wSocketContainer .connectToServer (MyEndpointClient .class , new URI ("ws://localhost:8080/binary/websockeet" ));
56
60
}
57
61
}
0 commit comments