File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,27 @@ public void CacheKeySameAfterReNormalizing()
75
75
} ) ;
76
76
}
77
77
78
+ [ Test ]
79
+ public void GitPreparerShouldFailWhenTargetPathNotInitialized ( )
80
+ {
81
+ RepositoryScope ( ( fixture , vv ) =>
82
+ {
83
+ var targetUrl = "https://github.com/GitTools/GitVersion.git" ;
84
+
85
+ var arguments = new Arguments
86
+ {
87
+ TargetUrl = targetUrl ,
88
+ TargetPath = null
89
+ } ;
90
+ var options = Options . Create ( arguments ) ;
91
+ Should . Throw < NullReferenceException > ( ( ) => new GitPreparer ( log , environment , options ) ) ;
92
+
93
+ arguments . TargetPath = fixture . RepositoryPath ;
94
+
95
+ Should . NotThrow ( ( ) => new GitPreparer ( log , environment , options ) ) ;
96
+ } ) ;
97
+ }
98
+
78
99
[ Test ]
79
100
[ Category ( "NoMono" ) ]
80
101
[ Description ( "LibGit2Sharp fails here when running under Mono" ) ]
You can’t perform that action at this time.
0 commit comments