File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
IntelliTect.Multitool.Tests Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -26,4 +26,19 @@ public void BuildVariables_BeingSetProperly()
2626 Assert . NotNull ( solutionDir ) ;
2727 Assert . NotEmpty ( solutionDir ) ;
2828 }
29+
30+ [ Fact ]
31+ public void TrySearchForGitContainingDirectory_ReturnsTrueWhenFound ( )
32+ {
33+ Assert . True ( RepositoryPaths . TrySearchForGitContainingDirectory ( new DirectoryInfo ( Directory . GetCurrentDirectory ( ) ) , out string gitParentDirectory ) ) ;
34+ // Makes the assumption that the repository directory for this solution is named the same as the solution
35+ Assert . EndsWith ( nameof ( Multitool ) , gitParentDirectory ) ;
36+ }
37+
38+ [ Fact ]
39+ public void TrySearchForGitContainingDirectory_ReturnsFalseWhenNotFound ( )
40+ {
41+ Assert . False ( RepositoryPaths . TrySearchForGitContainingDirectory ( new DirectoryInfo ( Path . GetPathRoot ( Directory . GetCurrentDirectory ( ) ) ) , out string gitParentDirectory ) ) ;
42+ Assert . Empty ( gitParentDirectory ) ;
43+ }
2944}
You can’t perform that action at this time.
0 commit comments