Пример #1
0
        public void TestCase_FromTestDataWithRandomHeights_Success()
        {
            var buildings = new int[] { 3, 5, 2, 4, 1 };

            LargestRectangleSolution solution = new LargestRectangleSolution(buildings);

            Assert.That(solution.FindLargestRectangle(), Is.EqualTo(8));
        }
Пример #2
0
        public void TestCase_FromTestData_Success()
        {
            var buildings = new int[] { 1, 2, 3, 4, 5 };

            LargestRectangleSolution solution = new LargestRectangleSolution(buildings);

            Assert.That(solution.FindLargestRectangle(), Is.EqualTo(9));
        }
Пример #3
0
        public void TestCase_FromTestDataWithDecreaseHeights_Success()
        {
            var buildings = new int[] { 5, 4, 3, 2, 1 };

            LargestRectangleSolution solution = new LargestRectangleSolution(buildings);

            Assert.That(solution.FindLargestRectangle(), Is.EqualTo(9));
        }