public void IsRevisionOnBranch_BranchNotPresent() { var file = new FileInfo("file.txt").WithBranch("branch1", "1.4.0.2"); Assert.IsFalse(file.IsRevisionOnBranch(Revision.Create("1.1"), "branch2")); }
public void IsRevisionOnBranch_BranchFromBranch_NotOnBranch() { var file = new FileInfo("file.txt") .WithBranch("branch1", "1.1.0.2") .WithBranch("branch2", "1.4.0.2") .WithBranch("branch3", "1.4.2.1.0.2"); // branch from branch2 Assert.IsFalse(file.IsRevisionOnBranch(Revision.Create("1.1.2.1"), "branch3")); }
public void IsRevisionOnBranch_RevisionIsSuccessorToBranchpoint() { var file = new FileInfo("file.txt").WithBranch("branch", "1.4.0.2"); Assert.IsFalse(file.IsRevisionOnBranch(Revision.Create("1.5"), "branch")); }
public void IsRevisionOnBranch_ManyBranches() { var file = new FileInfo("file.txt") .WithBranch("branch1", "1.4.0.2") .WithBranch("branch2", "1.4.2.3.0.2") .WithBranch("branch3", "1.4.2.3.2.1.0.6"); Assert.IsTrue(file.IsRevisionOnBranch( Revision.Create("1.3"), "branch3")); Assert.IsTrue(file.IsRevisionOnBranch( Revision.Create("1.4"), "branch3")); Assert.IsTrue(file.IsRevisionOnBranch( Revision.Create("1.4.2.2"), "branch3")); Assert.IsTrue(file.IsRevisionOnBranch( Revision.Create("1.4.2.3"), "branch3")); Assert.IsFalse(file.IsRevisionOnBranch(Revision.Create("1.4.2.4"), "branch3")); Assert.IsFalse(file.IsRevisionOnBranch(Revision.Create("1.4.4.1"), "branch3")); Assert.IsTrue(file.IsRevisionOnBranch( Revision.Create("1.4.2.3.2.1"), "branch3")); Assert.IsFalse(file.IsRevisionOnBranch(Revision.Create("1.4.2.3.2.2"), "branch3")); Assert.IsTrue(file.IsRevisionOnBranch( Revision.Create("1.4.2.3.2.1.6.1"), "branch3")); Assert.IsFalse(file.IsRevisionOnBranch(Revision.Create("1.4.2.3.2.1.2.1"), "branch3")); }
public void IsRevisionOnBranch_RevisionIsPredecessorOnMain() { var file = new FileInfo("file.txt").WithBranch("branch", "1.4.0.2"); Assert.IsTrue(file.IsRevisionOnBranch(Revision.Create("1.3"), "branch")); }
public void IsRevisionOnBranch_RevisionIsDirectlyOnTheBranch() { var file = new FileInfo("file.txt").WithBranch("branch", "1.4.0.2"); Assert.IsTrue(file.IsRevisionOnBranch(Revision.Create("1.4.2.5"), "branch")); }
public void IsRevisionOnBranch_RevisionIsBranchpoint() { var file = new FileInfo("file.txt").WithBranch("branch", "1.4.0.2"); Assert.IsTrue(file.IsRevisionOnBranch(Revision.Create("1.4"), "branch")); }
public void IsRevisionOnBranch_BranchRevisionIsNotOnMain() { var file = new FileInfo("file.txt"); Assert.IsFalse(file.IsRevisionOnBranch(Revision.Create("1.1.2.1"), "MAIN")); }
public void IsRevisionOnBranch_RevisionOnMain() { var file = new FileInfo("file.txt"); Assert.IsTrue(file.IsRevisionOnBranch(Revision.Create("1.1"), "MAIN")); }