@@ -62,23 +62,37 @@ public void tearDown() {
62
62
/**
63
63
* Test of isRepositoryFor method, of class SCCSRepository.
64
64
*/
65
- private void testIsRepositoryFor (final String fileName ) throws IOException {
65
+ private void testIsRepositoryFor (final String fileName , boolean shouldPass ) throws IOException {
66
66
File tdir = Files .createTempDirectory ("SCCSrepotest" + fileName ).toFile ();
67
67
File test = new File (tdir , fileName );
68
68
test .mkdirs ();
69
69
tdir .deleteOnExit ();
70
70
test .deleteOnExit ();
71
- SCCSRepository instance = new SCCSRepository ();
72
- assertTrue (instance .isRepositoryFor (tdir ));
71
+ SCCSRepository instance = new SCCSRepository ();
72
+ if (shouldPass ) {
73
+ assertTrue (instance .isRepositoryFor (tdir ));
74
+ } else {
75
+ assertFalse (instance .isRepositoryFor (tdir ));
76
+ }
73
77
}
74
78
75
79
@ Test
76
80
public void testIsRepositoryForCodemgr1 () throws IOException {
77
- testIsRepositoryFor ("Codemgr_wsdata" );
81
+ testIsRepositoryFor ("Codemgr_wsdata" , true );
78
82
}
79
83
80
84
@ Test
81
85
public void testIsRepositoryForCodemgr2 () throws IOException {
82
- testIsRepositoryFor ("codemgr_wsdata" );
86
+ testIsRepositoryFor ("codemgr_wsdata" , true );
87
+ }
88
+
89
+ @ Test
90
+ public void testIsRepositoryForCodemgr3 () throws IOException {
91
+ testIsRepositoryFor ("SCCS" , true );
92
+ }
93
+
94
+ @ Test
95
+ public void testIsRepositoryForCodemgrNot () throws IOException {
96
+ testIsRepositoryFor ("NOT" , false );
83
97
}
84
98
}
0 commit comments