"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "flow-server/src/test/java/com/vaadin/flow/server/connect/VaadinConnectControllerTest.java" between
vaadin-flow-4.0.7.tar.gz and vaadin-flow-4.0.8.tar.gz

About: Vaadin flow is a Java framework binding Vaadin 17 web components to Java.

VaadinConnectControllerTest.java  (vaadin-flow-4.0.7):VaadinConnectControllerTest.java  (vaadin-flow-4.0.8)
skipping to change at line 424 skipping to change at line 424
ResponseEntity<String> response = vaadinController.serveEndpoint( ResponseEntity<String> response = vaadinController.serveEndpoint(
TEST_ENDPOINT_NAME, "denyAll", TEST_ENDPOINT_NAME, "denyAll",
createRequestParameters("{}"), requestMock); createRequestParameters("{}"), requestMock);
assertEquals(HttpStatus.UNAUTHORIZED, response.getStatusCode()); assertEquals(HttpStatus.UNAUTHORIZED, response.getStatusCode());
assertTrue(response.getBody().contains("Anonymous access is not allowed" )); assertTrue(response.getBody().contains("Anonymous access is not allowed" ));
} }
@Test @Test
public void should_bePossibeToGetPrincipalInEndpoint() { public void should_bePossibeToGetPrincipalInEndpoint() {
VaadinService.setCurrent(service);
when(principal.getName()).thenReturn("foo"); when(principal.getName()).thenReturn("foo");
VaadinConnectController vaadinController = createVaadinController( VaadinConnectController vaadinController = createVaadinController(
TEST_ENDPOINT, new VaadinConnectAccessChecker()); TEST_ENDPOINT, new VaadinConnectAccessChecker());
ResponseEntity<String> response = vaadinController.serveEndpoint( ResponseEntity<String> response = vaadinController.serveEndpoint(
TEST_ENDPOINT_NAME, "getUserName", TEST_ENDPOINT_NAME, "getUserName",
createRequestParameters("{}"), requestMock); createRequestParameters("{}"), requestMock);
assertEquals("\"foo\"", response.getBody()); assertEquals("\"foo\"", response.getBody());
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)