Class LocalBasementServiceTestConfig

  • java.lang.Object
    • com.google.appengine.tools.development.testing.LocalBasementServiceTestConfig
  • All Implemented Interfaces:

    public class LocalBasementServiceTestConfig
    extends java.lang.Object
    implements LocalServiceTestConfig
    Config for accessing the LocalBasementService in tests. In order to verify that the expected data is being written, you will first need to provide an OutputStream for the data to be written to:
       private ByteArrayOutputStream protoStream = new ByteArrayOutputStream();
       LocalServiceTestHelper helper;
    • Constructor Detail

      • LocalBasementServiceTestConfig

        public LocalBasementServiceTestConfig()
    • Method Detail

      • getLocalBasementService

        public static LocalBasementService getLocalBasementService()
      • setLogToSawmillProtoStream

        public LocalBasementServiceTestConfig setLogToSawmillProtoStream(java.io.OutputStream out)
        Configure the LocalBasementServiceTestConfig to create the LocalBasementService so that it will write a request's final merged proto to the specified OutputStream. If this method is not called or is called with null, the final merged proto will not be written. Defaults to null and must be called (note: only applies to unit tests, in the Dev App Server defaults to writing to the filesystem). The final merged proto is only written once the request is over. You can indicate this to the unit test by either calling LocalServiceTestHelper#endRequest() or LocalServiceTestHelper#tearDown(). This method must be called prior to calling LocalServiceTestHelper#setUp().
        out - A non-closed OutputStream.<