Inheritance: ShouldlyAssertionContext
コード例 #1
0
 public TaskShouldlyThrowMessage(object expected, string exceptionMessage, Func <string> customMessage)
 {
     ShouldlyAssertionContext = new ShouldThrowAssertionContext(expected, null, exceptionMessage, isAsync: true);
     if (customMessage != null)
     {
         ShouldlyAssertionContext.CustomMessage = customMessage();
     }
 }
コード例 #2
0
 public TaskShouldlyThrowMessage(object expected, [InstantHandle] Func <string> customMessage)
 {
     ShouldlyAssertionContext = new ShouldThrowAssertionContext(expected, isAsync: true);
     if (customMessage != null)
     {
         ShouldlyAssertionContext.CustomMessage = customMessage();
     }
 }
コード例 #3
0
 public TaskShouldlyThrowMessage(object?expected, string?customMessage, [CallerMemberName] string shouldlyMethod = null !)
 {
     ShouldlyAssertionContext = new ShouldThrowAssertionContext(expected, isAsync: true, shouldlyMethod: shouldlyMethod);
     if (customMessage != null)
     {
         ShouldlyAssertionContext.CustomMessage = customMessage;
     }
 }
コード例 #4
0
 public TaskShouldlyThrowMessage(object expected, [InstantHandle] Func <string> customMessage, [CallerMemberName] string shouldlyMethod = null)
 {
     ShouldlyAssertionContext = new ShouldThrowAssertionContext(expected, isAsync: true, shouldlyMethod: shouldlyMethod);
     if (customMessage != null)
     {
         ShouldlyAssertionContext.CustomMessage = customMessage();
     }
 }
コード例 #5
0
 public AsyncShouldlyThrowShouldlyMessage(Type exception, [InstantHandle] Func <string> customMessage, StackTrace stackTrace)
 {
     ShouldlyAssertionContext = new ShouldThrowAssertionContext(exception, stackTrace: stackTrace, isAsync: true);
     if (customMessage != null)
     {
         ShouldlyAssertionContext.CustomMessage = customMessage();
     }
 }
コード例 #6
0
 public AsyncShouldlyThrowShouldlyMessage(Type exception, string?customMessage, StackTrace stackTrace,
                                          [CallerMemberName] string shouldlyMethod = null !)
 {
     ShouldlyAssertionContext = new ShouldThrowAssertionContext(exception, stackTrace: stackTrace, isAsync: true, shouldlyMethod: shouldlyMethod);
     if (customMessage != null)
     {
         ShouldlyAssertionContext.CustomMessage = customMessage;
     }
 }
コード例 #7
0
 public ShouldlyThrowMessage(object expected, string exceptionMessage, Func <string> customMessage,
                             [CallerMemberName] string shouldlyMethod = null)
 {
     ShouldlyAssertionContext = new ShouldThrowAssertionContext(expected, null, exceptionMessage, shouldlyMethod: shouldlyMethod);
     if (customMessage != null)
     {
         ShouldlyAssertionContext.CustomMessage = customMessage();
     }
 }
コード例 #8
0
 public AsyncShouldlyNotThrowShouldlyMessage(Type exception, [InstantHandle] Func <string> customMessage, StackTrace stackTrace, string exceptionMessage,
                                             [CallerMemberName] string shouldlyMethod = null)
 {
     ShouldlyAssertionContext = new ShouldThrowAssertionContext(exception, stackTrace: stackTrace, isAsync: true, shouldlyMethod: shouldlyMethod, actual: null, exceptionMessage: exceptionMessage);
     if (customMessage != null)
     {
         ShouldlyAssertionContext.CustomMessage = customMessage();
     }
 }
コード例 #9
0
ファイル: ShouldlyMessage.cs プロジェクト: arashjfz/shouldly
 public TaskShouldlyThrowMessage(object?expected, object?actual, [InstantHandle] Func <string?>?customMessage, [CallerMemberName] string shouldlyMethod = null !)
 {
     ShouldlyAssertionContext = new ShouldThrowAssertionContext(expected, actual, isAsync: true, shouldlyMethod: shouldlyMethod)
     {
         HasRelevantActual = true
     };
     if (customMessage != null)
     {
         ShouldlyAssertionContext.CustomMessage = customMessage();
     }
 }
コード例 #10
0
 public TaskShouldlyThrowMessage(object expected, object actual, [InstantHandle] Func <string> customMessage)
 {
     ShouldlyAssertionContext = new ShouldThrowAssertionContext(expected, actual, isAsync: true)
     {
         HasRelevantActual = true
     };
     if (customMessage != null)
     {
         ShouldlyAssertionContext.CustomMessage = customMessage();
     }
 }
コード例 #11
0
 public AsyncShouldlyThrowShouldlyMessage(Type expected, Type actual, [InstantHandle] Func <string> customMessage, StackTrace stackTrace)
 {
     ShouldlyAssertionContext = new ShouldThrowAssertionContext(expected, actual, stackTrace: stackTrace, isAsync: true)
     {
         HasRelevantActual = true
     };
     if (customMessage != null)
     {
         ShouldlyAssertionContext.CustomMessage = customMessage();
     }
 }
コード例 #12
0
 public ShouldlyThrowMessage(object?expected, object?actual, string?customMessage,
                             [CallerMemberName] string shouldlyMethod = null !)
 {
     ShouldlyAssertionContext = new ShouldThrowAssertionContext(expected, actual, shouldlyMethod: shouldlyMethod)
     {
         HasRelevantActual = true
     };
     if (customMessage != null)
     {
         ShouldlyAssertionContext.CustomMessage = customMessage;
     }
 }
コード例 #13
0
ファイル: ShouldlyMessage.cs プロジェクト: mholo65/shouldly
 public AsyncShouldlyThrowShouldlyMessage(Type exception, [InstantHandle] Func<string> customMessage, StackTrace stackTrace)
 {
     ShouldlyAssertionContext = new ShouldThrowAssertionContext(exception, stackTrace: stackTrace, isAsync: true);
     if (customMessage != null) ShouldlyAssertionContext.CustomMessage = customMessage();
 }
コード例 #14
0
ファイル: ShouldlyMessage.cs プロジェクト: mholo65/shouldly
 public TaskShouldlyThrowMessage(object expected, [InstantHandle] Func<string> customMessage, [CallerMemberName] string shouldlyMethod = null)
 {
     ShouldlyAssertionContext = new ShouldThrowAssertionContext(expected, isAsync: true, shouldlyMethod: shouldlyMethod);
     if (customMessage != null) ShouldlyAssertionContext.CustomMessage = customMessage();
 }
コード例 #15
0
ファイル: ShouldlyMessage.cs プロジェクト: mholo65/shouldly
 public ShouldlyThrowMessage(object expected, object actual, [InstantHandle] Func<string> customMessage,
     [CallerMemberName] string shouldlyMethod = null)
 {
     ShouldlyAssertionContext = new ShouldThrowAssertionContext(expected, actual, shouldlyMethod: shouldlyMethod)
     {
         HasRelevantActual = true
     };
     if (customMessage != null) ShouldlyAssertionContext.CustomMessage = customMessage();
 }
コード例 #16
0
ファイル: ShouldlyMessage.cs プロジェクト: mholo65/shouldly
 public ShouldlyThrowMessage(object expected, string exceptionMessage, Func<string> customMessage,
     [CallerMemberName] string shouldlyMethod = null)
 {
     ShouldlyAssertionContext = new ShouldThrowAssertionContext(expected, null, exceptionMessage, shouldlyMethod: shouldlyMethod);
     if (customMessage != null) ShouldlyAssertionContext.CustomMessage = customMessage();
 }
コード例 #17
0
ファイル: ShouldlyMessage.cs プロジェクト: gwest/shouldly
 public ShouldlyThrowShouldlyMessage(Type exception, [InstantHandle] Func<string> customMessage)
 {
     ShouldlyAssertionContext = new ShouldThrowAssertionContext(exception);
     if (customMessage != null) ShouldlyAssertionContext.CustomMessage = customMessage();
 }
コード例 #18
0
ファイル: ShouldlyMessage.cs プロジェクト: jruckert/shouldly
 public TaskShouldlyThrowMessage(object expected, string exceptionMessage, Func<string> customMessage)
 {
     ShouldlyAssertionContext = new ShouldThrowAssertionContext(expected, null, exceptionMessage, isAsync: true);
     if (customMessage != null) ShouldlyAssertionContext.CustomMessage = customMessage();
 }
コード例 #19
0
ファイル: ShouldlyMessage.cs プロジェクト: jruckert/shouldly
 public TaskShouldlyThrowMessage(object expected, [InstantHandle] Func<string> customMessage)
 {
     ShouldlyAssertionContext = new ShouldThrowAssertionContext(expected, isAsync: true);
     if (customMessage != null) ShouldlyAssertionContext.CustomMessage = customMessage();
 }
コード例 #20
0
ファイル: ShouldlyMessage.cs プロジェクト: jruckert/shouldly
 public TaskShouldlyThrowMessage(object expected, object actual, [InstantHandle] Func<string> customMessage)
 {
     ShouldlyAssertionContext = new ShouldThrowAssertionContext(expected, actual, isAsync: true)
     {
         HasRelevantActual = true
     };
     if (customMessage != null) ShouldlyAssertionContext.CustomMessage = customMessage();
 }