public void ResultLogicErrorIsConvertibleToFailure() { var logicOk = new ResultLogic <CustomErrorTest>(); Assert.IsFalse(ResultLogic.IsConvertibleToFailure(logicOk)); var logicWarn = new ResultLogic <CustomErrorTest>(true, "My warning", null, null); Assert.IsTrue(ResultLogic.IsConvertibleToFailure(logicWarn)); var logicFail = new ResultLogic <CustomErrorTest>(false, "My failure", new CustomErrorTest(), null); Assert.IsTrue(ResultLogic.IsConvertibleToFailure(logicFail)); }
public void ResultLogicIsConvertibleToFailure() { var logicOk = new ResultLogic(); Assert.IsFalse(ResultLogic.IsConvertibleToFailure(logicOk)); var logicWarn = new ResultLogic(true, "My warning", null); Assert.IsTrue(ResultLogic.IsConvertibleToFailure(logicWarn)); var logicFail = new ResultLogic(false, "My failure", null); Assert.IsTrue(ResultLogic.IsConvertibleToFailure(logicFail)); }