Exemplo n.º 1
0
        public void Nicole2018__When_5_Elements_Array_TTTTT__Expected_11_Leafs()
        {
            var inputArray     = new bool[] { true, true, true, true, true };
            var nicoleSolution = new Nicole2018Solution();
            var result         = nicoleSolution.Solution(inputArray);

            Assert.AreEqual(15, result);
        }
Exemplo n.º 2
0
        public void Nicole2018__When_Single_False_Element_Array__Expected_0()
        {
            var inputArray     = new bool[] { false };
            var nicoleSolution = new Nicole2018Solution();
            var result         = nicoleSolution.Solution(inputArray);

            Assert.AreEqual(0, result);
        }
Exemplo n.º 3
0
        public void Nicole2018__When_Empty_Array__Expected_0()
        {
            var inputArray     = new bool[] { };
            var nicoleSolution = new Nicole2018Solution();
            var result         = nicoleSolution.Solution(inputArray);

            Assert.AreEqual(0, result);
        }
Exemplo n.º 4
0
        public void Nicole2018__When_Big_True_Array__Expected_Time_Below_100ms()
        {
            var maxElements    = 100 * 1000;
            var inputArray     = Enumerable.Repeat(true, maxElements).ToArray();
            var nicoleSolution = new Nicole2018Solution();
            var result         = nicoleSolution.Solution(inputArray);

            Assert.AreEqual(5000150001, result);
        }