Beispiel #1
0
        public void ValueObject_should_be_compared_by_values_not_by_references()
        {
            //arrange
            var vo  = new FakeValueObject("test", 1, false);
            var fvo = new FakeValueObject("test", 1, false);

            //assert
            vo.Should().Be(fvo);
            vo.Should().NotBeSameAs(fvo);
        }
 private static void AssertAreNotEqual(
     FakeValueObject first, FakeValueObject second)
 {
     first.Should().NotBe(second);
     (first == second).Should().BeFalse();
     (first != second).Should().BeTrue();
 }
        public void Value_objects_are_not_equal_if_they_have_different_types()
        {
            var first = new FakeValueObject(1, "first", true);

            first.Should().NotBe("");
        }