1 package org.apache.maven.scm.provider.vss.commands.status;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import org.apache.maven.scm.ScmFileSet;
23 import org.apache.maven.scm.ScmTestCase;
24 import org.apache.maven.scm.manager.ScmManager;
25 import org.apache.maven.scm.provider.vss.commands.VssCommandLineUtils;
26 import org.apache.maven.scm.provider.vss.repository.VssScmProviderRepository;
27 import org.apache.maven.scm.repository.ScmRepository;
28 import org.codehaus.plexus.util.cli.Commandline;
29
30 import java.io.File;
31
32
33
34
35
36 public class VssStatusCommandTest
37 extends ScmTestCase
38 {
39 private ScmManager scmManager;
40
41 public void setUp()
42 throws Exception
43 {
44 super.setUp();
45
46 scmManager = getScmManager();
47 }
48
49 public void testCommandLine()
50 throws Exception
51 {
52 ScmRepository repository = scmManager
53 .makeScmRepository( "scm:vss|username|password@C:/Program File/Visual Source Safe|D:/myProject" );
54 ScmFileSet fileSet = new ScmFileSet( getTestFile( "target" ) );
55 VssStatusCommand command = new VssStatusCommand();
56 Commandline cl = command.buildCmdLine( (VssScmProviderRepository) repository.getProviderRepository(), fileSet );
57 String ssPath = VssCommandLineUtils.getSsDir().replace( '/', File.separatorChar );
58 assertCommandLine( ssPath + "ss Diff $D:/myProject -Yusername,password -R -I-", fileSet.getBasedir(), cl );
59 }
60 }