示例#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);
        }
示例#2
0
 private static void AssertAreNotEqual(
     FakeValueObject first, FakeValueObject second)
 {
     first.Should().NotBe(second);
     (first == second).Should().BeFalse();
     (first != second).Should().BeTrue();
 }
示例#3
0
        public void Value_objects_are_not_equal_if_they_have_different_types()
        {
            var first = new FakeValueObject(1, "first", true);

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