@@ -21,15 +21,22 @@ protected RepositoryFixtureBase(Func<string, IRepository> repoBuilder, Config co
21
21
22
22
public bool IsForTrackedBranchOnly { private get ; set ; }
23
23
24
- public SemanticVersion ExecuteGitVersion ( IRepository repository = null )
24
+ public void AssertFullSemver ( string fullSemver , IRepository repository = null )
25
25
{
26
- var vf = new GitVersionFinder ( ) ;
27
- return vf . FindVersion ( new GitVersionContext ( repository ?? Repository , configuration , IsForTrackedBranchOnly ) ) ;
26
+ var gitVersionContext = new GitVersionContext ( repository ?? Repository , configuration , IsForTrackedBranchOnly ) ;
27
+ var executeGitVersion = ExecuteGitVersion ( gitVersionContext ) ;
28
+ var variables = VariableProvider . GetVariablesFor ( executeGitVersion ,
29
+ gitVersionContext . Configuration . AssemblyVersioningScheme ,
30
+ gitVersionContext . Configuration . VersioningMode ,
31
+ gitVersionContext . Configuration . ContinuousDeploymentFallbackTag ,
32
+ gitVersionContext . IsCurrentCommitTagged ) ;
33
+ variables . FullSemVer . ShouldBe ( fullSemver ) ;
28
34
}
29
35
30
- public void AssertFullSemver ( string fullSemver , IRepository repository = null )
36
+ private SemanticVersion ExecuteGitVersion ( GitVersionContext context )
31
37
{
32
- ExecuteGitVersion ( repository ) . ToString ( "f" ) . ShouldBe ( fullSemver ) ;
38
+ var vf = new GitVersionFinder ( ) ;
39
+ return vf . FindVersion ( context ) ;
33
40
}
34
41
35
42
public virtual void Dispose ( )
0 commit comments