public void SliceNullArrayTest()
        {
            bool catchException = false;

            try
            {
                AlgosFromCodility.TotalOfSlice(null, 1, 5);
            }
            catch (ArgumentNullException)
            {
                catchException = true;
            }

            if (catchException)
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail();
            }
        }
        public void YBiggerThenArrayLengthTest()
        {
            bool catchException = false;

            try
            {
                AlgosFromCodility.TotalOfSlice(new long[3], 0, 5);
            }
            catch (ArgumentOutOfRangeException)
            {
                catchException = true;
            }

            if (catchException)
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail();
            }
        }
 public void NegativeSliceTest()
 {
     Assert.AreEqual(5, AlgosFromCodility.TotalOfSlice(new long[] { 0, -5, 5, 8 }, 0, 1));
 }
 public void OneElementSliceTest()
 {
     Assert.AreEqual(4, AlgosFromCodility.TotalOfSlice(new long[] { 0, 1, 3, 6, 10, 15, 21 }, 3, 3));
 }
 public void ExampleSliceTest()
 {
     Assert.AreEqual(12, AlgosFromCodility.TotalOfSlice(new long[] { 0, 1, 3, 6, 10, 15, 21 }, 2, 4));
 }