55import hudson .model .Hudson ;
66import hudson .plugins .perforce .PerforceToolInstallation .DescriptorImpl ;
77import hudson .plugins .perforce .browsers .P4Web ;
8+ import hudson .plugins .perforce .config .CleanTypeConfig ;
89import hudson .plugins .perforce .config .MaskViewConfig ;
910import hudson .plugins .perforce .config .WorkspaceCleanupConfig ;
1011import hudson .tools .ToolProperty ;
2324public class PerforceSCMTest extends HudsonTestCase {
2425 /// Preserves original behavior of the tests
2526 public static final DepotType EMPTY_DEPOT = null ;
27+ public static final DepotType TEST_DEPOT = new DepotType (DepotType .USE_PROJECTPATH_MARKER , null , null , "//..." );
2628 public static final MaskViewConfig EMPTY_MASKVIEW = null ;
29+ public static final MaskViewConfig TEST_MASKVIEW = new MaskViewConfig ("//..." , true , false , false );
2730 public static final WorkspaceCleanupConfig EMPTY_WORKSPACE_CLEANUP = null ;
31+ public static final WorkspaceCleanupConfig TEST_WORKSPACE_CLEANUP = new WorkspaceCleanupConfig (new CleanTypeConfig ("quick" , true ), true );
2832
2933 /**
3034 * Makes sure that the configuration survives the round-trip.
@@ -35,7 +39,7 @@ public void testConfigRoundtrip() throws Exception {
3539 PerforceSCM scm = new PerforceSCM (
3640 "user" , "pass" , "client" , "port" , "" , "exe" , "sysRoot" ,
3741 "sysDrive" , "label" , "counter" , "upstreamProject" , "shared" , "charset" , "charset2" , "user" , false , true , true , true , true , true , false ,
38- false , true , false , false , false , "${basename}" , 0 , -1 , browser , "exclude_user" , "exclude_file" , true , EMPTY_DEPOT , EMPTY_WORKSPACE_CLEANUP , EMPTY_MASKVIEW );
42+ false , true , false , false , false , "${basename}" , 0 , -1 , browser , "exclude_user" , "exclude_file" , true , TEST_DEPOT , TEST_WORKSPACE_CLEANUP , TEST_MASKVIEW );
3943 scm .setProjectPath ("path" );
4044 project .setScm (scm );
4145
0 commit comments