public void TriangleFiveDoesNotRunWhenGasesAreNotSpecified() { var algo = new DuvalTriangleFiveRule(FailureType.Code.T2); var outputs = Outputs; var applicable = algo.IsApplicable(emptyDga, emptyDga, outputs); Assert.AreEqual(false, applicable); }
public void TriangleFiveCalculatesCorrectFaultZone() { var algo = new DuvalTriangleFiveRule(FailureType.Code.T2); var outputs = Outputs; algo.Execute(ref DGA, ref emptyDga, ref outputs); Assert.AreEqual(FailureType.Code.C, algo.FailureCode); }
public void TriangleFiveOnlyRunsWithCorrectCodeFromTriangleOne() { var triangleOneCode = FailureType.Code.T2; var algo = new DuvalTriangleFiveRule(triangleOneCode); Assert.AreEqual(true, algo.IsApplicable(DGA, emptyDga, Outputs)); triangleOneCode = FailureType.Code.T3; algo = new DuvalTriangleFiveRule(triangleOneCode); Assert.AreEqual(true, algo.IsApplicable(DGA, emptyDga, Outputs)); triangleOneCode = FailureType.Code.D1; algo = new DuvalTriangleFiveRule(triangleOneCode); Assert.AreEqual(false, algo.IsApplicable(DGA, emptyDga, Outputs)); }