Example #1
0
        public void DataDrivenTest(int[] nums, int expectedLength)
        {
            var sut          = new ContiguousArray();
            int actualLength = sut.FindMaxLength(nums);

            actualLength.Should().Be(expectedLength, nums.Print());
        }
Example #2
0
        public void FindMaxLengthTests()
        {
            ContiguousArray obj = new ContiguousArray();

            int[] nums = { 1, 0, 1, 1, 0, 1, 1, 0 };

            var x = obj.FindMaxLength(nums);

            Assert.AreEqual(x, 4);
        }
        public void TestSolution(int[] input1, int expectedResult)
        {
            var result = new ContiguousArray().Resolve(input1);

            Assert.AreEqual(expectedResult, result);
        }