public void SutIsSpecifiedSpecimenCommand() { // Arrange // Act var sut = new UnspecifiedSpecimenCommand <object>(obj => { }); // Assert Assert.IsAssignableFrom <ISpecifiedSpecimenCommand <object> >(sut); }
public void SutIsSpecifiedSpecimenCommand() { // Fixture setup // Exercise system var sut = new UnspecifiedSpecimenCommand<object>(obj => { }); // Verify outcome Assert.IsAssignableFrom<ISpecifiedSpecimenCommand<object>>(sut); // Teardown }
public void SutIsSpecifiedSpecimenCommand() { // Fixture setup // Exercise system var sut = new UnspecifiedSpecimenCommand <object>(obj => { }); // Verify outcome Assert.IsAssignableFrom <ISpecifiedSpecimenCommand <object> >(sut); // Teardown }
public void IsSatisfiedByReturnsCorrectResult() { // Fixture setup var sut = new UnspecifiedSpecimenCommand<object>(s => { }); // Exercise system var dummyRequest = new object(); var result = sut.IsSatisfiedBy(dummyRequest); // Verify outcome Assert.False(result); // Teardown }
public void ActionIsCorrect() { // Fixture setup Action<string> expectedAction = s => { }; var sut = new UnspecifiedSpecimenCommand<string>(expectedAction); // Exercise system Action<string> result = sut.Action; // Verify outcome Assert.Equal(expectedAction, result); // Teardown }
public void IsSatisfiedByReturnsCorrectResult() { // Arrange var sut = new UnspecifiedSpecimenCommand <object>(s => { }); // Act var dummyRequest = new object(); var result = sut.IsSatisfiedBy(dummyRequest); // Assert Assert.False(result); }
public void ActionIsCorrect() { // Arrange Action <string> expectedAction = s => { }; var sut = new UnspecifiedSpecimenCommand <string>(expectedAction); // Act Action <string> result = sut.Action; // Assert Assert.Equal(expectedAction, result); }
/// <summary> /// Performs the specified action on a specimen. /// </summary> /// <param name="action">The action to perform.</param> /// <returns> /// An <see cref="IPostprocessComposer{T}"/> which can be used to further customize the /// post-processing of created specimens. /// </returns> public IPostprocessComposer <T> Do(Action <T> action) { if (action == null) { throw new ArgumentNullException("action"); } var postprocessor = new UnspecifiedSpecimenCommand <T>(action); return(this.WithPostprocessor(postprocessor)); }
public void IsSatisfiedByReturnsCorrectResult() { // Fixture setup var sut = new UnspecifiedSpecimenCommand <object>(s => { }); // Exercise system var dummyRequest = new object(); var result = sut.IsSatisfiedBy(dummyRequest); // Verify outcome Assert.False(result); // Teardown }
public void ActionIsCorrect() { // Fixture setup Action <string> expectedAction = s => { }; var sut = new UnspecifiedSpecimenCommand <string>(expectedAction); // Exercise system Action <string> result = sut.Action; // Verify outcome Assert.Equal(expectedAction, result); // Teardown }
public void ExecuteCorrectlyInvokesAction() { // Fixture setup var specimen = new object(); var verified = false; Action<object> spy = s => verified = specimen.Equals(s); var sut = new UnspecifiedSpecimenCommand<object>(spy); // Exercise system var dummyContainer = new DelegatingSpecimenContext(); sut.Execute(specimen, dummyContainer); // Verify outcome Assert.True(verified); // Teardown }
public void ExecuteCorrectlyInvokesAction() { // Arrange var specimen = new object(); var verified = false; Action <object> spy = s => verified = specimen.Equals(s); var sut = new UnspecifiedSpecimenCommand <object>(spy); // Act var dummyContainer = new DelegatingSpecimenContext(); sut.Execute(specimen, dummyContainer); // Assert Assert.True(verified); }
public void ExecuteCorrectlyInvokesAction() { // Fixture setup var specimen = new object(); var verified = false; Action <object> spy = s => verified = specimen.Equals(s); var sut = new UnspecifiedSpecimenCommand <object>(spy); // Exercise system var dummyContainer = new DelegatingSpecimenContext(); sut.Execute(specimen, dummyContainer); // Verify outcome Assert.True(verified); // Teardown }