Example #1
0
 public static bool ValidateBookLoanGuid(this ReturnBookCommand command)
 {
     return(AssertionsConcern.IsSatisfiedBy(AssertionsConcern.ValidateGuidFromString(command.LoanId,
                                                                                     Messages.BookReturn_LoanGuidStringIsEmpty,
                                                                                     Messages.BookReturn_LoanGuidIsEmpty,
                                                                                     Messages.BookReturn_LoanGuidIsInvalid)));
 }
Example #2
0
 public static bool ValidateBookLoanExists(this ReturnBookCommand command, BookLoan bookLoan)
 {
     return(AssertionsConcern.IsSatisfiedBy(AssertionsConcern.IsNotNull(bookLoan, "Book loan not found")));
 }