"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.6.tar.gz and vaadin-flow-4.0.7.tar.gz

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

VaadinConnectControllerTest.java  (vaadin-flow-4.0.6):VaadinConnectControllerTest.java  (vaadin-flow-4.0.7)
skipping to change at line 189 skipping to change at line 189
public void setUp() { public void setUp() {
requestMock = mock(HttpServletRequest.class); requestMock = mock(HttpServletRequest.class);
principal = mock(Principal.class); principal = mock(Principal.class);
when(requestMock.getUserPrincipal()).thenReturn(principal); when(requestMock.getUserPrincipal()).thenReturn(principal);
when(requestMock.getHeader("X-CSRF-Token")).thenReturn("Vaadin CCDM"); when(requestMock.getHeader("X-CSRF-Token")).thenReturn("Vaadin CCDM");
HttpSession sessionMock = mock(HttpSession.class); HttpSession sessionMock = mock(HttpSession.class);
when(sessionMock.getAttribute(com.vaadin.flow.server.VaadinService.getCs rfTokenAttributeName())) when(sessionMock.getAttribute(com.vaadin.flow.server.VaadinService.getCs rfTokenAttributeName()))
.thenReturn("Vaadin CCDM"); .thenReturn("Vaadin CCDM");
when(requestMock.getSession()).thenReturn(sessionMock); when(requestMock.getSession(false)).thenReturn(sessionMock);
} }
@Test @Test
public void should_ThrowException_When_NoEndpointNameCanBeReceived() { public void should_ThrowException_When_NoEndpointNameCanBeReceived() {
TestClass anonymousClass = new TestClass() { TestClass anonymousClass = new TestClass() {
}; };
assertEquals("Endpoint to test should have no name", assertEquals("Endpoint to test should have no name",
anonymousClass.getClass().getSimpleName(), ""); anonymousClass.getClass().getSimpleName(), "");
exception.expect(IllegalStateException.class); exception.expect(IllegalStateException.class);
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

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