use of org.apache.maven.scm.provider.perforce.PerforceScmProvider in project maven-scm by apache.
the class PerforceInfoCommandTest method testPerforceInfo.
public void testPerforceInfo() throws Exception {
ScmRepository repo = makeScmRepository("scm:perforce://depot/projects/pathname");
PerforceScmProviderRepository p4Repo = (PerforceScmProviderRepository) repo.getProviderRepository();
PerforceScmProvider prov = new PerforceScmProvider();
PerforceTagCommand cmd = new PerforceTagCommand();
cmd.setLogger(prov.getLogger());
if (PerforceScmProvider.isLive()) {
assertNotNull(PerforceInfoCommand.getInfo(prov.getLogger(), p4Repo).getEntry("User name"));
assertNotNull(PerforceInfoCommand.getInfo(prov.getLogger(), p4Repo).getEntry("Client root"));
assertNotNull(PerforceInfoCommand.getInfo(prov.getLogger(), p4Repo).getEntry("Client name"));
assertNotNull(PerforceInfoCommand.getInfo(prov.getLogger(), p4Repo).getEntry("Client host"));
assertNull(PerforceInfoCommand.getInfo(prov.getLogger(), p4Repo).getEntry("foobar"));
}
}
Aggregations