Exemplo n.º 1
0
        public void PlannerClass_GetRepetitiveDiveCell_SelectedValuesAndEdgeCases()
        {
            // below table limit
            new RepetitiveDiveCell('A', 10, 10, 209).AssertHasSamePropertyValues(_classUnderTest.GetRepetitiveDiveCell('A', 0));
            new RepetitiveDiveCell('A', 10, 10, 209).AssertHasSamePropertyValues(_classUnderTest.GetRepetitiveDiveCell('A', 1));

            // exact cell
            new RepetitiveDiveCell('A', 10, 10, 209).AssertHasSamePropertyValues(_classUnderTest.GetRepetitiveDiveCell('A', 10));

            // round up to next row
            new RepetitiveDiveCell('A', 12, 9, 138).AssertHasSamePropertyValues(_classUnderTest.GetRepetitiveDiveCell('A', 11));

            // limit of table
            new RepetitiveDiveCell('A', 40, 2, 7).AssertHasSamePropertyValues(_classUnderTest.GetRepetitiveDiveCell('A', 40));

            // null AdjustedNoDecompressionLimit

            // if working like the tables
            //new RepetitiveDiveCell('C', 40, 6, null).AssertHasSamePropertyValues(_classUnderTest.GetRepetitiveDiveCell('C', 40));

            // if working as an eRDPMl
            new RepetitiveDiveCell('C', 40, 6, 3).AssertHasSamePropertyValues(_classUnderTest.GetRepetitiveDiveCell('C', 40));

            // blank cell
            Assert.IsNull(_classUnderTest.GetRepetitiveDiveCell('H', 40), "Should be null for H @ 40m");

            // outside table limits
            Assert.IsNull(_classUnderTest.GetRepetitiveDiveCell('A', 41), "Should be null for 41m");
        }