Package com._1c.g5.v8.dt.testing
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
after()
void
deleteLibrary
(LibraryDescriptor libraryDescriptor) Deletes the library from the repository.boolean
isLibraryRegistered
(LibraryDescriptor libraryDescriptor) Checks whether the given library is registered in the repository.registerLibrary
(LibraryDescriptor libraryDescriptor) Registers the library in the repository.registerLibrary
(Path libraryPath) Registers the library in the repository.Methods inherited from class org.junit.rules.ExternalResource
apply, before
-
Constructor Details
-
TestingLibraryRepositorySupport
public TestingLibraryRepositorySupport()Creates a new instance.
-
-
Method Details
-
registerLibrary
Registers the library in the repository. Checks whether the specified library has not been registered before.- Parameters:
libraryPath
- the library file path, cannot benull
- Returns:
- the registered library descriptor, never
null
-
registerLibrary
Registers the library in the repository. Checks whether the specified library has not been registered before.- Parameters:
libraryDescriptor
- the library descriptor, cannot benull
- Returns:
- the registered library descriptor, never
null
-
deleteLibrary
Deletes the library from the repository. The deleted library should be registered before viaregisterLibrary(Path)
method.- Parameters:
libraryDescriptor
- the library descriptor to delete, cannot benull
-
isLibraryRegistered
Checks whether the given library is registered in the repository.- Parameters:
libraryDescriptor
- the library descriptor to check, cannot benull
- Returns:
true
if the library is registered in the repository,false
otherwise
-
after
protected void after()- Overrides:
after
in classorg.junit.rules.ExternalResource
-