public void WordsWithTheSameValues_ShouldBeEqual() { var firstWord = new TokenLocation(1, 3, 100); var secondWord = new TokenLocation(1, 3, 100); (firstWord == secondWord).Should().BeTrue(); (firstWord != secondWord).Should().BeFalse(); firstWord.Should().Be(secondWord); }
public void WordsWithDifferentValues_ShouldNotBeEqual() { var firstWord = new TokenLocation(1, 3, 100); var secondWord = new TokenLocation(1, 4, 100); (firstWord == secondWord).Should().BeFalse(); (firstWord != secondWord).Should().BeTrue(); firstWord.Should().NotBe(secondWord); }
public void WordsWithLowerStartValues_ShouldBeLessThanWordsWithHigherStartValues(int firstWordStart, int secondWordStart) { var firstWord = new TokenLocation(1, firstWordStart, 100); var secondWord = new TokenLocation(1, secondWordStart, 100); (firstWord < secondWord).Should().BeTrue(); (secondWord < firstWord).Should().BeFalse(); (firstWord > secondWord).Should().BeFalse(); (secondWord > firstWord).Should().BeTrue(); (firstWord <= secondWord).Should().BeTrue(); (secondWord <= firstWord).Should().BeFalse(); (firstWord >= secondWord).Should().BeFalse(); (secondWord >= firstWord).Should().BeTrue(); firstWord.Should().BeLessThan(secondWord); secondWord.Should().BeGreaterThan(firstWord); firstWord.Should().NotBe(secondWord); }