public void Constructor_WithNonNullField_FieldPropertyShouldHaveTheSameValue() { var field = "type"; var ex = new TransactionFieldException(field); Assert.Equal(field, ex.Field); }
public void Constructor_WithMessage_MessagePropertyShouldHaveTheSameValue() { var field = "type"; var msg = "qwerty"; var ex = new TransactionFieldException(field, msg); Assert.Equal(field, ex.Field); Assert.Equal(msg, ex.Message); }
public void Constructor_WithInner_InnerExceptionPropertyShouldHaveTheSameValue() { var field = "type"; var msg = "qwerty"; var inner = new Exception(); var ex = new TransactionFieldException(field, msg, inner); Assert.Equal(field, ex.Field); Assert.Equal(msg, ex.Message); Assert.Same(inner, ex.InnerException); }