public void TestThatIsManipulatingFieldThrowsArgumentNullExceptionIfFieldNameIsEmpty() { var fixture = new Fixture(); var dataManipulator = new MyDataManipulator(fixture.CreateAnonymous <string>()); Assert.That(dataManipulator, Is.Not.Null); Assert.Throws <ArgumentNullException>(() => dataManipulator.IsManipulatingField(string.Empty)); }
public void TestThatIsManipulatingFieldCallsManipulatingField() { var fixture = new Fixture(); var dataManipulator = new MyDataManipulator(fixture.CreateAnonymous <string>()); Assert.That(dataManipulator, Is.Not.Null); Assert.That(dataManipulator.ManipulatingFieldCalled, Is.False); Assert.That(dataManipulator.IsManipulatingField(fixture.CreateAnonymous <string>()), Is.True); Assert.That(dataManipulator.ManipulatingFieldCalled, Is.True); }