Annotation Type WebServerTest


  • @Test
    @Target(METHOD)
    @Retention(RUNTIME)
    @Documented
    public @interface WebServerTest
    A type of Test which calls MockWebServer.enqueue(MockResponse) and creates a MockResponse with the annotation data.
    Since:
    1.0.0
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String[] value
      This accepts one or more response values.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      Class<? extends org.elypia.webservertestbed.api.ContentLoader> loader  
    • Element Detail

      • value

        String[] value
        This accepts one or more response values. They will be #enqueued in the order that they are given in the array.
        Returns:
        All response bodies for the test.
      • loader

        Class<? extends org.elypia.webservertestbed.api.ContentLoader> loader
        Returns:
        The ContentLoader to use when loading the value(). Defaults to searching for a resource in the classpath and reading it.
        Default:
        org.elypia.webservertestbed.loaders.ResourceContentLoader.class