コード例 #1
0
        public void HalidanCompartment_ConstantDepth_NegativePressureHelium_ThrowException()
        {
            HalidanCompartment target = new HalidanCompartment();
            double PartialPresureHeliumInspired = -1;
            double PartialPresureNitrogenInspired = 1;
            double time = 1;

            Assert.Throws<ArgumentException>(() => target.ConstantDepth(PartialPresureHeliumInspired, PartialPresureNitrogenInspired, time));
        }
コード例 #2
0
        public void HalidanCompartment_AscendDescend_TimeZero_ThrowException()
        {
            HalidanCompartment target = new HalidanCompartment();
            double PartialPresureHeliumInspired = 1;
            double PartialPresureNitrogenInspired = 1;
            double rateHe = 1;
            double rateN2 = 1;
            double time = 0;

            Assert.Throws<ArgumentException>(() => target.AscendDescend(PartialPresureHeliumInspired, PartialPresureNitrogenInspired, rateHe, rateN2, time));
        }
コード例 #3
0
        public void HalidanCompartment_SetPartialPressure_NegativePressureNitrogen_ThrowException()
        {
            HalidanCompartment target = new HalidanCompartment();
            double PartialPresureHelium = 1;
            double PartialPresureNitrogen = -1;

            Assert.Throws<ArgumentException>(() => target.SetPartialPressure(PartialPresureHelium, PartialPresureNitrogen));
        }
コード例 #4
0
 public void HalidanCompartment_SetCompartmentTimeConstants_SetNitrogeAnVerify()
 {
     HalidanCompartment target = new HalidanCompartment();
     double halftiemeHelium = 1;
     double halftiemNitrogen = 2;
     target.SetCompartmentTimeConstants(halftiemeHelium, halftiemNitrogen);
     double actual;
     actual = target.HalfTimeNitrogen;
     Assert.Equal(halftiemNitrogen, actual);
 }
コード例 #5
0
 public void HalidanCompartment_SetM0ValueAndValidateValueSet()
 {
     HalidanCompartment target = new HalidanCompartment();
     double m0value = 50;
     target.SetM0Value(m0value);
     Assert.Equal(m0value, target.M0Value);
 }
コード例 #6
0
        public void HalidanCompartment_SetCompartmentTimeConstants_NegativePressureNitrogen_ThrowException()
        {
            HalidanCompartment target = new HalidanCompartment();
            double hHe = 1;
            double hN2 = -1;

            Assert.Throws<ArgumentException>(() => target.SetCompartmentTimeConstants(hHe, hN2));
        }
コード例 #7
0
 public void HalidanCompartment_PartialPresureHelium_SetAndVerify()
 {
     HalidanCompartment target = new HalidanCompartment();
     double expected = 1;
     double actual;
     target.PartialPresureHelium = expected;
     actual = target.PartialPresureHelium;
     Assert.Equal(expected, actual);
 }
コード例 #8
0
 public void HalidanCompartment_Constructor_CreateDefualtInstance_AllPressureAreZero()
 {
     HalidanCompartment target = new HalidanCompartment();
     Assert.Equal(0.0, target.PartialPresureHelium);
     Assert.Equal(0.0, target.PartialPresureNitrogen);
 }
コード例 #9
0
 public void HalidanCompartment_ConstDepth_SetNitrogenPressureAndInsperieNitrogen_VerifyResult()
 {
     HalidanCompartment target = new HalidanCompartment();
     target.SetCompartmentTimeConstants(0, 5);
     target.PartialPresureNitrogen = 2;
     target.ConstantDepth(0, 3, 4);
     double actual = Math.Round(target.PartialPresureNitrogen, 4);
     Assert.Equal(2.4257, actual);
     Assert.Equal(0, target.PartialPresureHelium);
 }
コード例 #10
0
 public void HalidanCompartment_ConstDepth_SetHeliumPressureAndInsperieHelium_VerifyResult()
 {
     HalidanCompartment target = new HalidanCompartment();
     target.SetCompartmentTimeConstants(5, 0);
     target.PartialPresureHelium = 2;
     target.ConstantDepth(8, 0, 4);
     double actual = Math.Round(target.PartialPresureHelium, 4);
     Assert.Equal(4.5539, actual);
     Assert.Equal(0, target.PartialPresureNitrogen);
 }