public void Should_Return_Value_When_Property_Is_Null() { Address address = new Address { ZipCode = null }; var result = address.Return(x => x.ZipCode, "No zip code on file"); Assert.AreEqual("No zip code on file", result); }
public void Should_Return_Value_When_Property_Is_Default_ValueType() { Address address = new Address { Number = 0 }; var result = address.Return(x => x.Number, -12345); Assert.AreEqual(-12345, result); }