| java.lang.Object org.apache.ivy.TestHelper
TestHelper | public class TestHelper (Code) | | |
Method Summary | |
public static void | assertModuleRevisionIds(String expectedMrids, Collection mrids) Assertion utility methods to test if a collection of
ModuleRevisionId matches a given
expected set of mrids. | public static void | cleanTest() Cleans up the test repository and cache. | public static void | cleanTestRepository() Cleans up the test repository. | public static void | fillRepository(DependencyResolver resolver, Collection mds) Fills a repository with a set of module, using empty files for published artifacts. | public static File | getArchiveFileInCache(Ivy ivy, String organisation, String module, String revision, String artifactName, String type, String ext) | public static DefaultRepositoryCacheManager | getRepositoryCacheManager(Ivy ivy, ModuleRevisionId id) | public static IvySettings | loadTestSettings(IvySettings settings) Init a test resolver as default, useful combined with
TestHelper.fillRepository(DependencyResolver,Collection) . | public static DefaultArtifact | newArtifact(String organisation, String module, String revision, String artifact, String type, String ext) | public static ResolveData | newResolveData(IvySettings settings) | public static ResolveOptions | newResolveOptions(IvySettings settings) | public static FileSystemResolver | newTestRepository() A file system resolver which can be used with the
TestHelper.fillRepository(DependencyResolver,Collection) method to create a test case of
module descriptor. | public static ModuleDescriptor | parseMicroIvyDescriptor(String microIvy) Parses a string represenation of a module descriptor in micro ivy format. | public static Collection | parseMicroIvyDescriptors(String microIvy) Parses a collection of module descriptors in the micro ivy format, separated by double semi
columns. | public static Collection | parseMrids(String mrids) Returns a Set of
ModuleRevisionId corresponding to the given comma separated list of
their text representation. | public static ModuleRevisionId[] | parseMridsToArray(String mrids) Returns an array of
ModuleRevisionId corresponding to the given comma separated list of
their text representation. |
assertModuleRevisionIds | public static void assertModuleRevisionIds(String expectedMrids, Collection mrids)(Code) | | Assertion utility methods to test if a collection of
ModuleRevisionId matches a given
expected set of mrids.
Expected mrids is given as a String of comma separated string representations of
ModuleRevisionId .
Parameters: expectedMrids - the expected set of mrids Parameters: mrids - the3 mrids to test |
fillRepository | public static void fillRepository(DependencyResolver resolver, Collection mds) throws IOException(Code) | | Fills a repository with a set of module, using empty files for published artifacts.
Parameters: resolver - the resolver to use to publish the modules Parameters: mds - the descriptors of the modules to put in the repository throws: IOException - if an IO problem occurs while filling the repository |
newResolveData | public static ResolveData newResolveData(IvySettings settings)(Code) | | Create basic resolve data using the given settings
Parameters: settings - the settings to use to create the resolve data basic resolve data useful for testing |
newResolveOptions | public static ResolveOptions newResolveOptions(IvySettings settings)(Code) | | Create basic resolve options using the given settings
Parameters: settings - the settings to use to create the resolve options the basic resolve options, useful for testing |
parseMicroIvyDescriptor | public static ModuleDescriptor parseMicroIvyDescriptor(String microIvy)(Code) | | Parses a string represenation of a module descriptor in micro ivy format.
Examples:
#A;1
#A;2-> #B;[1.0,1.5]
#A;3-> { #B;[1.0,1.5] #C;[2.0,2.5] }
Parameters: microIvy - the micro ivy description of the module descriptor the parsed module descriptor |
parseMicroIvyDescriptors | public static Collection parseMicroIvyDescriptors(String microIvy)(Code) | | Parses a collection of module descriptors in the micro ivy format, separated by double semi
columns.
Parameters: microIvy - the text representation of the collection of module descriptors the collection of module descriptors parsed |
|
|