Class TestingLibraryRepositorySupport

java.lang.Object
org.junit.rules.ExternalResource
com._1c.g5.v8.dt.testing.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 Details

    • TestingLibraryRepositorySupport

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

    • 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
    • registerLibrary

      public LibraryDescriptor registerLibrary(LibraryDescriptor libraryDescriptor)
      Registers the library in the repository. Checks whether the specified library has not been registered before.
      Parameters:
      libraryDescriptor - the library descriptor, 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