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 Constructor Description TestingLibraryRepositorySupport()
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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.LibraryDescriptor
registerLibrary(Path libraryPath)
Registers the library in the repository.
-
-
-
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 benull
- 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 viaregisterLibrary(Path)
method.- Parameters:
libraryDescriptor
- the library descriptor to delete, cannot benull
-
isLibraryRegistered
public boolean isLibraryRegistered(LibraryDescriptor libraryDescriptor)
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
-
-