public void Should_GenPrev() { var lexorank = LexoRank.Max(); var prevLexorank = lexorank.GenPrev(); lexorank.CompareTo(prevLexorank).ShouldBe(1); }
public void Should_Between_MinMax() { var minRank = LexoRank.Min(); var maxRank = LexoRank.Max(); var between = minRank.Between(maxRank); between.ToString().ShouldBe("0|hzzzzz:"); minRank.CompareTo(between).ShouldBeLessThan(0); maxRank.CompareTo(between).ShouldBeGreaterThan(0); }
public void Should_Between_MaxGenPrev() { var maxRank = LexoRank.Max(); var prevRank = maxRank.GenPrev(); var between = maxRank.Between(prevRank); between.ToString().ShouldBe("0|yzzzzz:"); maxRank.CompareTo(between).ShouldBeGreaterThan(0); prevRank.CompareTo(between).ShouldBeLessThan(0); }
public void Should_Between_Middle() { // Arrange var minRank = LexoRank.Min(); var maxRank = LexoRank.Max(); // Act var middleRank = LexoRank.Middle(); var prevMiddleRank = middleRank.GenPrev(); var nextMiddleRank = middleRank.GenNext(); // Assert middleRank.ToString().ShouldBe("0|hzzzzz:"); minRank.CompareTo(middleRank).ShouldBeLessThan(0); maxRank.CompareTo(middleRank).ShouldBeGreaterThan(0); prevMiddleRank.CompareTo(middleRank).ShouldBeLessThan(0); nextMiddleRank.CompareTo(middleRank).ShouldBeGreaterThan(0); }
public void Should_IsMax() { var lexorank = LexoRank.Max(); lexorank.IsMax().ShouldBeTrue(); }