public void ThrowIfHardcore_Test() { try { ThrowTest.ArgumentException().IfHardcode(Condition, nameof(GuardCompare)); } catch (Exception e) { // ignored } }
public void ThrowIfHardcoreWithInlineMessage_Test() { try { ThrowTest.ArgumentException() .If(Condition, nameof(GuardCompare), name => $"{nameof(GuardCompare)} is not valid"); } catch (Exception e) { // ignored } }