use of org.apache.maven.scm.providers.clearcase.settings.Settings in project maven-scm by apache.
the class ClearCaseScmProviderRepositoryTest method testParsingUrlClearCaseUCMAutoConfigWithElement.
public void testParsingUrlClearCaseUCMAutoConfigWithElement() throws ScmRepositoryException {
Settings settings = new Settings();
settings.setClearcaseType(ClearCaseScmProviderRepository.CLEARCASE_UCM);
String delimiter = "|";
String loadPath = "/ua/sub/project";
String vobName = "pvob_alliance";
String streamName = "INT_COMMUN_V1.0";
String elementName = "/main/element/LATEST";
String url = "load " + loadPath + delimiter + vobName + delimiter + streamName + delimiter + elementName;
ClearCaseScmProviderRepository repository = new ClearCaseScmProviderRepository(new DefaultLog(), url, settings);
assertNull(repository.getConfigSpec());
assertTrue(repository.isAutoConfigSpec());
assertNotNull(repository.getViewName("bla"));
assertEquals(loadPath, repository.getLoadDirectory());
assertEquals(streamName, repository.getStreamName());
assertEquals(vobName, repository.getVobName());
assertEquals(elementName, repository.getElementName());
}
use of org.apache.maven.scm.providers.clearcase.settings.Settings in project maven-scm by apache.
the class ClearCaseScmProviderRepositoryTest method testParsingUrlWithoutViewName.
public void testParsingUrlWithoutViewName() throws ScmRepositoryException {
Settings settings = new Settings();
String configSpecPath = "//myserver/ClearCase/ConfigSpecs/mymodule.txt";
String url = configSpecPath;
ClearCaseScmProviderRepository repository = new ClearCaseScmProviderRepository(new DefaultLog(), url, settings);
assertEquals(new File(configSpecPath).getPath(), repository.getConfigSpec().getPath());
assertNotNull(repository.getViewName("15"));
assertTrue(repository.getViewName("15").indexOf("15") != -1);
assertNull(repository.getLoadDirectory());
assertNull(repository.getStreamName());
assertNull(repository.getVobName());
}
use of org.apache.maven.scm.providers.clearcase.settings.Settings in project maven-scm by apache.
the class ClearCaseScmProviderRepositoryTest method testAutoConfigSpecWithColon.
public void testAutoConfigSpecWithColon() throws Exception {
Settings settings = new Settings();
String url = "my_view_name:load /VOB/some/dir";
ClearCaseScmProviderRepository repository = new ClearCaseScmProviderRepository(new DefaultLog(), url, settings);
assertNull(repository.getConfigSpec());
assertTrue(repository.isAutoConfigSpec());
assertEquals("my_view_name", repository.getViewName("bla"));
assertEquals("/VOB/some/dir", repository.getLoadDirectory());
assertNull(repository.getStreamName());
assertNull(repository.getVobName());
}
use of org.apache.maven.scm.providers.clearcase.settings.Settings in project maven-scm by apache.
the class ClearCaseScmProviderRepositoryTest method testParsingUrlClearCaseUCMWithoutViewnameWithColon.
public void testParsingUrlClearCaseUCMWithoutViewnameWithColon() throws ScmRepositoryException {
Settings settings = new Settings();
settings.setClearcaseType(ClearCaseScmProviderRepository.CLEARCASE_UCM);
String delimiter = ":";
String configSpecPath = "//myserver/ClearCase/ConfigSpecs/mymodule.txt";
String vobName = "pvob_alliance";
String streamName = "INT_COMMUN_V1.0";
String url = configSpecPath + delimiter + vobName + delimiter + streamName;
ClearCaseScmProviderRepository repository = new ClearCaseScmProviderRepository(new DefaultLog(), url, settings);
assertEquals(new File(configSpecPath).getPath(), repository.getConfigSpec().getPath());
assertNotNull(repository.getViewName("bla"));
assertNull(repository.getLoadDirectory());
assertEquals(streamName, repository.getStreamName());
assertEquals(vobName, repository.getVobName());
}
use of org.apache.maven.scm.providers.clearcase.settings.Settings in project maven-scm by apache.
the class ClearCaseScmProviderRepositoryTest method testAutoConfigSpecWithPipe.
public void testAutoConfigSpecWithPipe() throws Exception {
Settings settings = new Settings();
String url = "my_view_name|load /VOB/some/dir";
ClearCaseScmProviderRepository repository = new ClearCaseScmProviderRepository(new DefaultLog(), url, settings);
assertNull(repository.getConfigSpec());
assertTrue(repository.isAutoConfigSpec());
assertEquals("my_view_name", repository.getViewName("bla"));
assertEquals("/VOB/some/dir", repository.getLoadDirectory());
assertNull(repository.getStreamName());
assertNull(repository.getVobName());
}
Aggregations