Class TestingLibraryRepositorySupport

  • All Implemented Interfaces:
    org.junit.rules.TestRule

    public final class TestingLibraryRepositorySupport
    extends org.junit.rules.ExternalResource
    Support class with helper methods to work with the library repository.
    • Constructor Detail

      • TestingLibraryRepositorySupport

        public TestingLibraryRepositorySupport()
        Creates a new instance.
    • Method Detail

      • registerLibrary

        public LibraryDescriptor registerLibrary​(Path libraryPath)
        Registers the library in the repository. Checks whether the specified library has not been registered before.
        Parameters:
        libraryPath - the library file path, cannot be null
        Returns:
        the registered library descriptor, never null
      • deleteLibrary

        public void deleteLibrary​(LibraryDescriptor libraryDescriptor)
        Deletes the library from the repository. The deleted library should be registered before via registerLibrary(Path) method.
        Parameters:
        libraryDescriptor - the library descriptor to delete, cannot be null
      • isLibraryRegistered

        public boolean isLibraryRegistered​(LibraryDescriptor libraryDescriptor)
        Checks whether the given library is registered in the repository.
        Parameters:
        libraryDescriptor - the library descriptor to check, cannot be null
        Returns:
        true if the library is registered in the repository, false otherwise
      • after

        protected void after()
        Overrides:
        after in class org.junit.rules.ExternalResource