public void TestThatConstructorInitializeIdentifiableBase() { var identifiable = new MyIdentifiable(); Assert.That(identifiable, Is.Not.Null); Assert.That(identifiable.Identifier, Is.Null); Assert.That(identifiable.Identifier.HasValue, Is.False); }
public void TestThatIdentifierSetterSetsIdentififer(string identifier) { var id = new Guid(identifier); var identifiable = new MyIdentifiable(); Assert.That(identifiable, Is.Not.Null); Assert.That(identifiable.Identifier, Is.Null); Assert.That(identifiable.Identifier.HasValue, Is.False); identifiable.Identifier = id; Assert.That(identifiable, Is.Not.Null); Assert.That(identifiable.Identifier, Is.Not.Null); // ReSharper disable ConditionIsAlwaysTrueOrFalse Assert.That(identifiable.Identifier.HasValue, Is.True); // ReSharper restore ConditionIsAlwaysTrueOrFalse }