Пример #1
0
        public void Equals_should_return_true_if_all_fiels_are_equal()
        {
            var subject1 = new ClusterId(1);
            var subject2 = new ClusterId(1);

            subject1.Equals(subject2).Should().BeTrue();
            subject1.Equals((object)subject2).Should().BeTrue();
            subject1.GetHashCode().Should().Be(subject2.GetHashCode());
        }
Пример #2
0
        public void Equals_should_return_false_if_any_field_is_not_equal()
        {
            var subject1 = new ClusterId(1);
            var subject2 = new ClusterId(2);

            subject1.Equals(subject2).Should().BeFalse();
            subject1.Equals((object)subject2).Should().BeFalse();
            subject1.GetHashCode().Should().NotBe(subject2.GetHashCode());
        }