public void Apply_Feature_Branch_Changes_Version_Resets_On_Merge() { using (var fixture = new SimpleVersionRepositoryFixture()) { // Arrange var config = fixture.GetConfig(); fixture.MakeACommit(); fixture.MakeACommit(); fixture.MakeACommit(); fixture.MakeACommit(); fixture.BranchTo("feature/other"); fixture.MakeACommit(); config.Version = "0.1.1"; fixture.SetConfig(config); fixture.MakeACommit(); fixture.MakeACommit(); fixture.Checkout("master"); fixture.MergeNoFF("feature/other"); var context = new VersionContext(fixture.Repository); // Act _sut.Apply(context); // Assert context.Result.Height.Should().Be(1); } }
public void Apply_Modfied_No_Version_Or_Label_Changes_Does_Not_Reset() { using (var fixture = new SimpleVersionRepositoryFixture()) { // Arrange var config = fixture.GetConfig(); fixture.MakeACommit(); fixture.MakeACommit(); fixture.MakeACommit(); fixture.MakeACommit(); config.Metadata.Add("example"); fixture.SetConfig(config); var context = new VersionContext(fixture.Repository); // Act _sut.Apply(context); // Assert context.Result.Height.Should().Be(6); } }