public void VerifyWritableForAllPropertiesOnMutableClass() { var fixture = new Fixture(); var assertion = new WritablePropertyAssertion(fixture); var properties = typeof(DoublePropertyHolder<string, int>).GetProperties(); assertion.Verify(properties); }
public void TestValueProperty( WritablePropertyAssertion assertion, ISchedulers schedulers) { var sut = new ObservableProperty<string>(schedulers); assertion.VerifyProperty(() => sut.Value); }
public void VerifyWritableForProperty() { var fixture = new Fixture(); var assertion = new WritablePropertyAssertion(fixture); var property = typeof(PropertyHolder<object>).GetProperty("Property"); assertion.Verify(property); }
public void VerifyNullPropertyThrows() { // Fixture setup var dummyComposer = new Fixture(); var sut = new WritablePropertyAssertion(dummyComposer); // Exercise system and verify outcome Assert.Throws<ArgumentNullException>(() => sut.Verify((PropertyInfo)null)); // Teardown }
public void SutIsIdiomaticAssertion() { // Fixture setup var dummyComposer = new Fixture(); // Exercise system var sut = new WritablePropertyAssertion(dummyComposer); // Verify outcome Assert.IsAssignableFrom<IdiomaticAssertion>(sut); // Teardown }
public void ComposerIsCorrect() { // Fixture setup var expectedComposer = new Fixture(); var sut = new WritablePropertyAssertion(expectedComposer); // Exercise system ISpecimenBuilder result = sut.Builder; // Verify outcome Assert.Equal(expectedComposer, result); // Teardown }
public void VerifyIllBehavedPropertySetterThrows() { // Fixture setup var composer = new Fixture(); var sut = new WritablePropertyAssertion(composer); var propertyInfo = typeof(IllBehavedPropertyHolder<object>).GetProperty("PropertyIllBehavedSet"); // Exercise system and verify outcome var e = Assert.Throws<WritablePropertyException>(() => sut.Verify(propertyInfo)); Assert.Equal(propertyInfo, e.PropertyInfo); // Teardown }
public void YearIsWritable(WritablePropertyAssertion assertion) { assertion.Verify(Reflect<DateViewModel>.GetProperty<int>(sut => sut.Year)); }
public void RemainingCapacityIsWritable(WritablePropertyAssertion assertion) { assertion.Verify(Reflect<BookingViewModel>.GetProperty<int>(sut => sut.RemainingCapacity)); }
public void QuantityIsWritable(WritablePropertyAssertion assertion) { assertion.Verify(Reflect<BookingViewModel>.GetProperty<int>(sut => sut.Quantity)); }
public void NameIsWritable(WritablePropertyAssertion assertion) { assertion.Verify(Reflect<BookingViewModel>.GetProperty<string>(sut => sut.Name)); }
public void DateIsWritable(WritablePropertyAssertion assertion) { assertion.Verify(Reflect<BookingViewModel>.GetProperty<DateTime>(sut => sut.Date)); }
public void WritablePropertiesBehaveCorrectly(WritablePropertyAssertion assertion) { assertion.Verify(typeof(ParadigmTestClassCommand)); }
public void TestProperty( SampleBindable sut, WritablePropertyAssertion assertion) { assertion.VerifyProperty(() => sut.Property); }
public void VerifyReadOnlyPropertyDoesNotThrow() { // Fixture setup var dummyComposer = new Fixture(); var sut = new WritablePropertyAssertion(dummyComposer); var propertyInfo = typeof(ReadOnlyPropertyHolder<object>).GetProperty("Property"); // Exercise system and verify outcome Assert.DoesNotThrow(() => sut.Verify(propertyInfo)); // Teardown }
public void WritablePropertiesBehaveCorrectly(WritablePropertyAssertion assertion) { // Exercise system and verify outcome assertion.Verify(typeof (JSendClientSettings).GetProperties()); }
public void Properties_AreWritable(WritablePropertyAssertion assertion, IFixture fixture) { fixture.MakeNonRecursive(); assertion.Verify(typeof(GraphNode)); }