Class AbstractTestResourceProvider

    • Field Detail

      • INTEGRITY_TEST_FILES_SUFFIX

        public static final java.lang.String INTEGRITY_TEST_FILES_SUFFIX
        The default suffix indicating a file is an Integrity test file.
        See Also:
        Constant Field Values
      • resourceFiles

        protected java.util.Set<TestResource> resourceFiles
        The resources in this provider. This abstract class supports an "early-evaluation" model: resources are discovered and added early, before they're actually requested. This thing does not have to be thread-safe, as the resource discovery phase is not expected to be run in parallel on multiple threads (and if an implementor would do such a thing, he is responsible to protect against thread interferences).
    • Constructor Detail

      • AbstractTestResourceProvider

        public AbstractTestResourceProvider()
    • Method Detail

      • setClassLoader

        public void setClassLoader​(java.lang.ClassLoader aClassLoader)
      • getClassLoader

        public java.lang.ClassLoader getClassLoader()
        Description copied from interface: TestResourceProvider
        Returns the classloader to use for all dynamic class resolving needs.
        Specified by:
        getClassLoader in interface TestResourceProvider
        Returns:
        the classloader to use
      • addResource

        protected void addResource​(TestResource aResource)
        Adds a given resource to the resourceFiles.
        Parameters:
        aResource - the resource to add
      • createResource

        protected TestResource createResource​(java.lang.String aResourceName)
        Convenience method to create a new TestResource instance wrapping a certain test resource name.
        Parameters:
        aResourceName - the resource name to wrap
        Returns:
        the resource instance
      • createAndAddResource

        protected void createAndAddResource​(java.lang.String aResourceName)
        Convenience method to create and add a new TestResource.
        Parameters:
        aResourceName - the resource name to wrap