Exemplo n.º 1
0
 public void ExplicitStaticMethodIfWithTemplate()
 {
     try
     {
         ThrowTest.If(Condition, () => $"{nameof(BaseCompare)} is not valid");
     }
     catch (Exception e)
     {
         // ignored
     }
 }
Exemplo n.º 2
0
 public void ThrowIfHardcore_Test()
 {
     try
     {
         ThrowTest.ArgumentException().IfHardcode(Condition, nameof(GuardCompare));
     }
     catch (Exception e)
     {
         // ignored
     }
 }
Exemplo n.º 3
0
 public void ExplicitStaticMethodIf()
 {
     try
     {
         ThrowTest.If(Condition, nameof(BaseCompare));
     }
     catch (Exception e)
     {
         // ignored
     }
 }
Exemplo n.º 4
0
 public void ThrowIfHardcoreWithInlineMessage_Test()
 {
     try
     {
         ThrowTest.ArgumentException()
         .If(Condition, nameof(GuardCompare), name => $"{nameof(GuardCompare)} is not valid");
     }
     catch (Exception e)
     {
         // ignored
     }
 }