public void PropertyNotSetThrowsInvalidOperationException() { var prop = new FluentProperty<int>(); Assert.Throws<InvalidOperationException>(() => { int i = prop.Value; }, "The property value is not set."); }
public void NewInstanceHasFalsePropertySet() { var prop = new FluentProperty<int>(); Assert.That(prop.PropertySet, Is.False); }
public void PropertySetIsChosenWhenConditionalOrMethodIsCalled() { var nextProp = new FluentProperty<int>(); var oldProp = new FluentProperty<int>(); Assert.That(nextProp.Or(oldProp), Is.EqualTo(default(FluentProperty<int>))); oldProp = 10; Assert.That(nextProp.Or(oldProp).Value, Is.EqualTo(10)); nextProp = 12; Assert.That(nextProp.Or(oldProp).Value, Is.EqualTo(12)); }