示例#1
0
                public void Should_return_a_success_notification_if_the_Statement_has_a_selected_account()
                {
                    var statement = new Statement
                    {
                        SelectedAccount = new Account()
                    };
                    var executionArguments = new ExecutionArguments
                    {
                        Statement = statement
                    };
                    var result = new RequireSelectedAccount().Check(executionArguments);

                    result.IsValid.ShouldBeTrue();
                }
示例#2
0
                public void Should_return_an_error_notification_if_the_Statement_result_has_errors()
                {
                    var statement = new Statement
                    {
                        SelectedAccount = null
                    };
                    var executionArguments = new ExecutionArguments
                    {
                        Statement = statement
                    };
                    var result = new RequireSelectedAccount().Check(executionArguments);

                    result.IsValid.ShouldBeFalse();
                    result.Errors.ShouldContain(RequireSelectedAccount.AccountNeedsToBeSelected.ReplaceTypeReferencesWithUIDescriptions(false));
                }