Search in sources :

Example 1 with PerforceScmProvider

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"));
    }
}
Also used : ScmRepository(org.apache.maven.scm.repository.ScmRepository) PerforceTagCommand(org.apache.maven.scm.provider.perforce.command.tag.PerforceTagCommand) PerforceScmProvider(org.apache.maven.scm.provider.perforce.PerforceScmProvider) PerforceScmProviderRepository(org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository)

Aggregations

PerforceScmProvider (org.apache.maven.scm.provider.perforce.PerforceScmProvider)1 PerforceTagCommand (org.apache.maven.scm.provider.perforce.command.tag.PerforceTagCommand)1 PerforceScmProviderRepository (org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository)1 ScmRepository (org.apache.maven.scm.repository.ScmRepository)1