Пример #1
0
        public void TriangleFiveDoesNotRunWhenGasesAreNotSpecified()
        {
            var algo       = new DuvalTriangleFiveRule(FailureType.Code.T2);
            var outputs    = Outputs;
            var applicable = algo.IsApplicable(emptyDga, emptyDga, outputs);

            Assert.AreEqual(false, applicable);
        }
Пример #2
0
        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);
        }
Пример #3
0
        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));
        }