Package testutils

Class ContextMocker


  • public class ContextMocker
    extends java.lang.Object
    Helper class that provides methods to mock Play's Context
    • Constructor Summary

      Constructors 
      Constructor Description
      ContextMocker()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void mock()
      Mocks Play's Http.Context without cookies
      static void mock​(java.util.List<play.mvc.Http.Cookie> cookieList)
      Mocks Play's Http.Context with cookies.
      static void mock​(play.mvc.Http.Cookie cookie)
      Mocks Play's Http.Context with one cookie
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ContextMocker

        public ContextMocker()
    • Method Detail

      • mock

        public static void mock()
        Mocks Play's Http.Context without cookies
      • mock

        public static void mock​(play.mvc.Http.Cookie cookie)
        Mocks Play's Http.Context with one cookie
      • mock

        public static void mock​(java.util.List<play.mvc.Http.Cookie> cookieList)
        Mocks Play's Http.Context with cookies.