public void Command_of_T_ExecutionResult_Should_Contain_No_Errors_When_Validation_Is_Successful() { var mock = new MockCommandOfString(); var result = mock.Execute(); result.Errors.ShouldBe(null); }
public void Command_of_T_ExecutionResult_Is_Successful_When_Validation_Is_Successful() { var mock = new MockCommandOfString(); var result = mock.Execute(); result.Success.ShouldBe(true); }
public void Command_of_T_Execute_Returns_Value_When_No_Errors_Exist() { var mock = new MockCommandOfString(); var result = mock.Execute(); result.Value.ShouldBe("some value"); }
public void Command_of_T_OnExecute_Is_Invoked_When_No_Errors_Exist() { var mock = new MockCommandOfString(); var result = mock.Execute(); mock.OnExecuteWasInvoked.ShouldBe(true); }
public void Command_of_T_OnInitialization_Is_Invoked() { var mock = new MockCommandOfString(); var result = mock.Execute(); mock.OnInitializationWasInvoked.ShouldBe(true); }
public void Command_of_T_OnExecute_Is_Not_Invoked_When_Errors_Exist() { var mock = new MockCommandOfString(); mock.Errors = new[] { new ValidationResult("Object doesn't exist") }; mock.Execute(); mock.OnExecuteWasInvoked.ShouldBe(false); }
public void Command_of_T_ExecutionResult_Should_Contain_Errors_When_Validation_Is_Not_Successful() { var mock = new MockCommandOfString { Errors = new[] { new ValidationResult("Object doesn't exist") } }; var result = mock.Execute(); result.Errors.Count().ShouldBe(1); }
public void Command_of_T_ExecutionResult_Is_Not_Successful_When_Validation_Is_Not_Successful() { var mock = new MockCommandOfString { Errors = new[] { new ValidationResult("Object doesn't exist") } }; var result = mock.Execute(); result.Success.ShouldBe(false); }