@@ -20,11 +20,9 @@ public GitPreparerTests()
2020 const string SpecificBranchName = "feature/foo" ;
2121
2222 [ Test ]
23- [ TestCase ( null , DefaultBranchName , false ) ]
24- [ TestCase ( SpecificBranchName , SpecificBranchName , false ) ]
25- [ TestCase ( null , DefaultBranchName , true ) ]
26- [ TestCase ( SpecificBranchName , SpecificBranchName , true ) ]
27- public void WorksCorrectlyWithRemoteRepository ( string branchName , string expectedBranchName , bool checkConfig )
23+ [ TestCase ( null , DefaultBranchName ) ]
24+ [ TestCase ( SpecificBranchName , SpecificBranchName ) ]
25+ public void WorksCorrectlyWithRemoteRepository ( string branchName , string expectedBranchName )
2826 {
2927 var repoName = Guid . NewGuid ( ) . ToString ( ) ;
3028 var tempPath = Path . GetTempPath ( ) ;
@@ -41,22 +39,8 @@ public void WorksCorrectlyWithRemoteRepository(string branchName, string expecte
4139 fixture . Repository . MakeCommits ( 5 ) ;
4240 fixture . Repository . CreateFileAndCommit ( "TestFile.txt" ) ;
4341
44- if ( checkConfig )
45- {
46- fixture . Repository . CreateFileAndCommit ( "GitVersionConfig.yaml" ) ;
47- }
48-
4942 fixture . Repository . CreateBranch ( SpecificBranchName ) ;
5043
51- if ( checkConfig )
52- {
53- fixture . Repository . Refs . UpdateTarget ( fixture . Repository . Refs . Head , fixture . Repository . Refs [ "refs/heads/" + SpecificBranchName ] ) ;
54-
55- fixture . Repository . CreateFileAndCommit ( "GitVersionConfig.yaml" ) ;
56-
57- fixture . Repository . Refs . UpdateTarget ( fixture . Repository . Refs . Head , fixture . Repository . Refs [ "refs/heads/" + DefaultBranchName ] ) ;
58- }
59-
6044 var arguments = new Arguments
6145 {
6246 TargetPath = tempDir ,
@@ -83,12 +67,6 @@ public void WorksCorrectlyWithRemoteRepository(string branchName, string expecte
8367 var currentBranch = repository . Head . CanonicalName ;
8468
8569 currentBranch . EndsWith ( expectedBranchName ) . ShouldBe ( true ) ;
86-
87- if ( checkConfig )
88- {
89- var expectedConfigPath = Path . Combine ( dynamicRepositoryPath , "..\\ GitVersionConfig.yaml" ) ;
90- File . Exists ( expectedConfigPath ) . ShouldBe ( true ) ;
91- }
9270 }
9371 }
9472 }
0 commit comments