1 package org.apache.maven.scm.provider.jazz;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.io.File;
23 import java.util.ArrayList;
24 import java.util.Iterator;
25 import java.util.List;
26
27 import org.apache.maven.scm.ScmFileSet;
28 import org.apache.maven.scm.ScmTestCase;
29 import org.apache.maven.scm.provider.jazz.repository.JazzScmProviderRepository;
30
31
32
33
34
35
36
37 public abstract class JazzScmTestCase
38 extends ScmTestCase
39 {
40
41
42
43
44
45 protected JazzScmProviderRepository getScmProviderRepository()
46 {
47 return new JazzScmProviderRepository( "https://localhost:9443/jazz", "myUserName", "myPassword",
48 "localhost", 9443, "Dave's Repository Workspace" );
49 }
50
51
52
53
54
55 protected String getFiles()
56 {
57 String path = "";
58 for ( Iterator<File> it = getScmFileSet().getFileList().iterator(); it.hasNext(); )
59 {
60 File file = (File) it.next();
61 path += file.getName() + " ";
62 }
63 return path.trim();
64 }
65
66
67
68
69
70 protected ScmFileSet getScmFileSet()
71 {
72 File file1 = new File( "file1" );
73 File file2 = new File( "file2" );
74 List<File> fileList = new ArrayList<File>();
75
76 fileList.add( file1 );
77 fileList.add( file2 );
78
79 return new ScmFileSet( getWorkingDirectory(), fileList );
80 }
81 }