예제 #1
0
        public static bool TestSetByIndex4()
        {
            #region Test
            //arrange
            IArrayVector actual   = new ArrayVector(new double[] { 1, 2, 3, 4, 5 });
            IArrayVector expected = new ArrayVector(new double[] { 1, 2, 6, 4, 5 });

            //act
            actual.Set(2, 6);

            //assert
            return(Enumerable.SequenceEqual(actual.Get(), expected.Get()));

            #endregion
        }
예제 #2
0
        public static bool TestClone2()
        {
            //arrange
            IArrayVector expected = new ArrayVector(new double[] { 1, 2, 3, 4 });

            double[] expected1 = expected.Get();

            //act
            IArrayVector actual = expected.Clone();

            actual.Set(2, 6);

            //assert
            return(Enumerable.SequenceEqual(expected.Get(), expected1));
        }