Exemple #1
0
 public static Func <bool> IsDateEquals(DateTime date1, DateTime date2, string message)
 {
     return(delegate()
     {
         if (!(date1.Date == date2.Date))
         {
             DomainNotificationsFacade.AddNotification(message);
             return false;
         }
         return true;
     });
 }
Exemple #2
0
 public static Func <bool> IsNull(object obj, string message)
 {
     return(delegate()
     {
         if (obj != null)
         {
             DomainNotificationsFacade.AddNotification(message);
             return false;
         }
         return true;
     });
 }
Exemple #3
0
 public static Func <bool> IsEquals(int value1, int value2, string message)
 {
     return(delegate()
     {
         if (!(value1 == value2))
         {
             DomainNotificationsFacade.AddNotification(message);
             return false;
         }
         return true;
     });
 }
Exemple #4
0
 public static Func <bool> IsGuidNotEmpty(Guid guid, string message)
 {
     return(delegate()
     {
         if (Guid.Empty == guid)
         {
             DomainNotificationsFacade.AddNotification(message);
             return false;
         }
         return true;
     });
 }
Exemple #5
0
 public static Func <bool> IsGuidNotNull(Guid guid, string message)
 {
     return(delegate()
     {
         if (guid == null)
         {
             DomainNotificationsFacade.AddNotification(message);
             return false;
         }
         return true;
     });
 }
Exemple #6
0
 public static Func <bool> HasMinimumLength(string value, int minLength, string message)
 {
     return(delegate()
     {
         if (value.Length < minLength)
         {
             DomainNotificationsFacade.AddNotification(message);
             return false;
         }
         return true;
     });
 }
Exemple #7
0
 public static Func <bool> IsLowerOrEquals(DateTime value1, DateTime value2, string message)
 {
     return(delegate()
     {
         if (!(value1 <= value2))
         {
             DomainNotificationsFacade.AddNotification(message);
             return false;
         }
         return true;
     });
 }
Exemple #8
0
 public static Func <bool> IsStringNotNullOrWhiteSpace(string value, string message)
 {
     return(delegate()
     {
         if (string.IsNullOrWhiteSpace(value))
         {
             DomainNotificationsFacade.AddNotification(message);
             return false;
         }
         return true;
     });
 }
Exemple #9
0
 public static Func <bool> IsGreaterThanOrEquals(decimal?value1, decimal value2, string message)
 {
     return(delegate()
     {
         if (!(value1 >= value2))
         {
             DomainNotificationsFacade.AddNotification(message);
             return false;
         }
         return true;
     });
 }
Exemple #10
0
 public static Func <bool> HasLengthEquals(string value, int length, string message)
 {
     return(delegate()
     {
         if (value?.Length != length)
         {
             DomainNotificationsFacade.AddNotification(message);
             return false;
         }
         return true;
     });
 }
Exemple #11
0
 public static bool HasNotifications()
 {
     return(DomainNotificationsFacade.HasNotifications());
 }
Exemple #12
0
 public AddAuthorCommandTest()
 {
     DomainNotificationsFacade.SetTestingEnvironment();
 }
 public BookLoanTests()
 {
     DomainNotificationsFacade.SetTestingEnvironment();
 }
 public AuthorTests()
 {
     DomainNotificationsFacade.SetTestingEnvironment();
 }
 public PersonTests()
 {
     DomainNotificationsFacade.SetTestingEnvironment();
 }
 public AddBookCommandTests()
 {
     DomainNotificationsFacade.SetTestingEnvironment();
 }
 public RequestLoanCommandTests()
 {
     DomainNotificationsFacade.SetTestingEnvironment();
 }