public void StringIdShouldEqualString() { Aggregates.Id id = "test"; id.Equals("test").Should().BeTrue(); (id == (Id)"test").Should().BeTrue(); (id != (Id)"tt").Should().BeTrue(); }
public void LongIdShouldEqualLong() { Aggregates.Id id = 1L; id.Equals(1L).Should().BeTrue(); (id == (Id)1L).Should().BeTrue(); (id != (Id)2L).Should().BeTrue(); }
public void EntityHasId() { Aggregates.Id id = "test"; Inject(id); Sut.Id.Should().Be((Aggregates.Id) "test"); }
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(); }
public void ShouldCreateIdFromLong() { Aggregates.Id id = 1L; long test = id; long? test2 = id; }
public void ShouldCreateIdFromGuid() { Aggregates.Id id = Guid.NewGuid(); Guid test = id; Guid? test2 = id; }
public void ShouldCreateIdFromString() { Aggregates.Id id = "test"; string test = id; }
public void ShouldGetStringWithNullValue() { var id = new Aggregates.Id(null); id.ToString().Should().Be("null"); }