Exemplo n.º 1
0
        public void WordsWithTheSameValues_ShouldBeEqual()
        {
            var firstWord  = new WordLocation(1, 3, 100);
            var secondWord = new WordLocation(1, 3, 100);

            (firstWord == secondWord).Should().BeTrue();
            (firstWord != secondWord).Should().BeFalse();
            firstWord.Should().Be(secondWord);
        }
Exemplo n.º 2
0
        public void WordsWithDifferentValues_ShouldNotBeEqual()
        {
            var firstWord  = new WordLocation(1, 3, 100);
            var secondWord = new WordLocation(1, 4, 100);

            (firstWord == secondWord).Should().BeFalse();
            (firstWord != secondWord).Should().BeTrue();
            firstWord.Should().NotBe(secondWord);
        }
Exemplo n.º 3
0
        public void WordsWithLowerStartValues_ShouldBeLessThanWordsWithHigherStartValues(int firstWordStart, int secondWordStart)
        {
            var firstWord  = new WordLocation(1, firstWordStart, 100);
            var secondWord = new WordLocation(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);
        }