use of org.apache.maven.scm.log.ScmLogger in project maven-scm by apache.
the class StatConsumerTest method consume.
private String consume(String resource) throws IOException {
ScmLogger logger = new DefaultLog();
StatConsumer consumer = new StatConsumer(logger);
AccuRevJUnitUtil.consume(resource, consumer);
return consumer.getStatus();
}
use of org.apache.maven.scm.log.ScmLogger in project maven-scm by apache.
the class SvnExeScmProviderTest method testGetRepositoryURL_Windows.
// SCM-435
@Test
public void testGetRepositoryURL_Windows() throws Exception {
Assume.assumeTrue(Os.isFamily(Os.FAMILY_WINDOWS));
// prepare
ScmLogger logger = mock(ScmLogger.class);
when(logger.isInfoEnabled()).thenReturn(Boolean.TRUE);
scmProvider.addListener(logger);
File workingDirectory = new File(".");
// test
// Since SCM-project has moved from svn to GIT, we can't verify the URL of this project
String url;
try {
url = scmProvider.getRepositoryURL(workingDirectory);
// verify
assertFalse(url.startsWith("file://"));
} catch (ScmException e) {
}
// verify
verify(logger).info("Executing: cmd.exe /X /C \"svn --non-interactive info .\"");
verify(logger).info("Working directory: " + workingDirectory.getCanonicalPath());
}
use of org.apache.maven.scm.log.ScmLogger in project maven-scm by apache.
the class AccuRevJUnitUtil method getLogger.
public static ScmLogger getLogger(PlexusContainer plexusContainer) throws ComponentLookupException {
LoggerManager loggerManager = (LoggerManager) plexusContainer.lookup(LoggerManager.ROLE);
Logger logger = loggerManager.getLoggerForComponent(ScmManager.ROLE);
return new PlexusLogger(logger);
}
use of org.apache.maven.scm.log.ScmLogger in project maven-scm by apache.
the class PerforceLoginCommandTest method disabledTestLoginWithoutPassword.
/**
* This test requires P4 installed
*
* @throws Exception
*/
public void disabledTestLoginWithoutPassword() throws Exception {
ScmRepository repository = getScmManager().makeScmRepository("scm:perforce://depot/projects/pathname");
PerforceScmProviderRepository scmRepository = (PerforceScmProviderRepository) repository.getProviderRepository();
ScmFileSet fileSet = new ScmFileSet(new File("."));
PerforceLoginCommand command = new PerforceLoginCommand();
ScmLogger logger = new DefaultLog();
command.setLogger(logger);
command.executeLoginCommand(scmRepository, fileSet, null);
}
Aggregations