* Websocket implementation * Websocket implementation with Akka Streams * Websocket implementation with Akka Streams * Websocket implementation with Akka Streams * Added configuration options for play server timeout and websocket frame lengths * Cleaned up code for consuming http endpoint in Messenger actor * Cleaned up code for consuming http endpoint in Messenger actor * Cleaned up code for akka streams implementation for websocket * Renamed unit test method * Added Poison Pill for stopping the actor. Fixed indentations. * Refactored the WebSocket method for readability * Refactored the JavaScript for readability * Code refactoring and removing unwanted comments * Added the latest version of jQuery * Removed .gitignore in favor of the one at the project root
		
			
				
	
	
		
			33 lines
		
	
	
		
			833 B
		
	
	
	
		
			Java
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			833 B
		
	
	
	
		
			Java
		
	
	
	
	
	
| package controllers;
 | |
| 
 | |
| import org.junit.Test;
 | |
| import play.Application;
 | |
| import play.inject.guice.GuiceApplicationBuilder;
 | |
| import play.mvc.Http;
 | |
| import play.mvc.Result;
 | |
| import play.test.WithApplication;
 | |
| 
 | |
| import static org.junit.Assert.assertEquals;
 | |
| import static play.mvc.Http.Status.OK;
 | |
| import static play.test.Helpers.GET;
 | |
| import static play.test.Helpers.route;
 | |
| 
 | |
| public class HomeControllerTest extends WithApplication {
 | |
| 
 | |
|     @Override
 | |
|     protected Application provideApplication() {
 | |
|         return new GuiceApplicationBuilder().build();
 | |
|     }
 | |
| 
 | |
|     @Test
 | |
|     public void giveRequest_whenRootPath_ThenStatusOkay() {
 | |
|         Http.RequestBuilder request = new Http.RequestBuilder()
 | |
|                 .method(GET)
 | |
|                 .uri("/");
 | |
| 
 | |
|         Result result = route(app, request);
 | |
|         assertEquals(OK, result.status());
 | |
|     }
 | |
| 
 | |
| }
 |