Advertisement
Guest User

Untitled

a guest
Oct 18th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. package ch.bs.zid.kundenkonto.test;
  2.  
  3. import info.magnolia.cms.filters.Mapping;
  4. import info.magnolia.debug.SessionDebugger;
  5. import org.junit.Assert;
  6. import org.junit.Test;
  7. import org.mockito.Mockito;
  8.  
  9. import javax.servlet.http.HttpServletRequest;
  10.  
  11. public class MappingTest {
  12. @Test
  13. public void testPathPrefix(){
  14. Mapping map =new Mapping();
  15. map.addMapping("/.oauth");
  16. HttpServletRequest request = Mockito.mock(HttpServletRequest.class);
  17. Mockito.when(request.getRequestURI()).thenReturn("/konto/.oauth");
  18. Mapping.MatchingResult match = map.match(request);
  19. Assert.assertFalse(match.isMatching());
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement