@@ -14,23 +14,30 @@ private class RepositoryPathsClassData : IEnumerable<object[]>
14
14
{
15
15
public IEnumerator < object [ ] > GetEnumerator ( )
16
16
{
17
+ yield return new object [ ] { "/home/lchaia/dotnet-affected" , "" , "/home/lchaia/dotnet-affected" , null } ;
17
18
yield return new object [ ]
18
19
{
19
- "/home/lchaia/dotnet-affected" , "" , "/home/lchaia/dotnet-affected"
20
+ "" , "/home/lchaia/dotnet-affected/Affected.sln" ,
21
+ Path . GetDirectoryName ( "/home/lchaia/dotnet-affected/Affected.sln" ) ,
22
+ "/home/lchaia/dotnet-affected/Affected.sln"
20
23
} ;
21
24
yield return new object [ ]
22
25
{
23
- "" , "/home/lchaia/dotnet-affected/Affected.sln" ,
24
- Path . GetDirectoryName ( "/home/lchaia/dotnet-affected/ Affected.sln" )
26
+ "/home/lchaia/dotnet-affected " , "/home/lchaia/dotnet-affected/subdirectory/other /Affected.sln" ,
27
+ "/home/lchaia/dotnet-affected" , "/home/lchaia/dotnet-affected/subdirectory/other/ Affected.sln",
25
28
} ;
29
+ yield return new object [ ] { "" , "" , Environment . CurrentDirectory , null } ;
30
+
26
31
yield return new object [ ]
27
32
{
28
- "/home/lchaia/dotnet-affected " , "/home/lchaia/dotnet-affected/subdirectory/other/ Affected.sln" ,
29
- "/home/lchaia/dotnet-affected"
33
+ "" , "Affected.sln" , Environment . CurrentDirectory ,
34
+ Path . Join ( Environment . CurrentDirectory , "Affected.sln" )
30
35
} ;
36
+
31
37
yield return new object [ ]
32
38
{
33
- "" , "" , Environment . CurrentDirectory
39
+ "/home/lchaia/dotnet-affected" , "Affected.sln" , "/home/lchaia/dotnet-affected" ,
40
+ Path . Join ( Environment . CurrentDirectory , "Affected.sln" )
34
41
} ;
35
42
}
36
43
@@ -41,21 +48,20 @@ public IEnumerator<object[]> GetEnumerator()
41
48
[ ClassData ( typeof ( RepositoryPathsClassData ) ) ]
42
49
public void Should_determine_repository_path_correctly (
43
50
string repositoryPath ,
44
- string solutionPath ,
45
- string expected )
51
+ string filterFilePath ,
52
+ string expectedRepository ,
53
+ string expectedFilterFilePath )
46
54
{
47
- var options = new AffectedOptions ( repositoryPath , solutionPath ) ;
48
- Assert . Equal ( expected , options . RepositoryPath ) ;
55
+ var options = new AffectedOptions ( repositoryPath , filterFilePath ) ;
56
+ Assert . Equal ( expectedRepository , options . RepositoryPath ) ;
57
+ Assert . Equal ( expectedFilterFilePath , options . FilterFilePath ) ;
49
58
}
50
59
51
60
private class OutputDirPathsClassData : IEnumerable < object [ ] >
52
61
{
53
62
public IEnumerator < object [ ] > GetEnumerator ( )
54
63
{
55
- yield return new object [ ]
56
- {
57
- "/home/lchaia/dotnet-affected" , "" , "/home/lchaia/dotnet-affected"
58
- } ;
64
+ yield return new object [ ] { "/home/lchaia/dotnet-affected" , "" , "/home/lchaia/dotnet-affected" } ;
59
65
yield return new object [ ]
60
66
{
61
67
"/home/lchaia/dotnet-affected" , "relative/path" ,
0 commit comments