public void LongIdShouldEqualLong() { Aggregates.Id id = 1L; id.Equals(1L).Should().BeTrue(); (id == (Id)1L).Should().BeTrue(); (id != (Id)2L).Should().BeTrue(); }
public void StringIdShouldEqualString() { Aggregates.Id id = "test"; id.Equals("test").Should().BeTrue(); (id == (Id)"test").Should().BeTrue(); (id != (Id)"tt").Should().BeTrue(); }
public void TwoIdenticalIdsShouldEqual() { Aggregates.Id id1 = "test"; Aggregates.Id id2 = "test"; id1.Equals(id2).Should().BeTrue(); }
public void GuidIdShouldEqualGuid() { var guid = Guid.NewGuid(); Aggregates.Id id = guid; id.Equals(guid).Should().BeTrue(); (id == (Id)guid).Should().BeTrue(); (id != (Id)Guid.NewGuid()).Should().BeTrue(); }
public void NullIdShouldEqualNull() { Aggregates.Id id = (string)null; id.Equals(null).Should().BeTrue(); }
public void IdShouldNotEqualNull() { Aggregates.Id id = "test"; id.Equals(null).Should().BeFalse(); }
public void TwoSameIdShouldBeEqual() { Aggregates.Id id = "test"; id.Equals(id).Should().BeTrue(); }