public void MWArray_ToEnumerableOfNumericArray_Double_to_Double_Test()
        {
            var ik = new double[8][];

            for (int i = 0; i < 8; i++)
            {
                ik[i] = new double[] { 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 }
            }
            ;

            Assert.That(MWArrayExtensions.ToEnumerableOfArrays <double>(new MWNumericArray(ik)), Is.EquivalentTo(ik));
        }
        public void MWArray_ToEnumerableOfNumericArray_Array_With_One_Item_Test()
        {
            var ik = new int[1][];

            for (int i = 0; i < 1; i++)
            {
                ik[i] = new int[] { 1 }
            }
            ;

            Assert.That(MWArrayExtensions.ToEnumerableOfArrays <int>(new MWNumericArray(ik)), Is.EquivalentTo(ik));
        }
        public void MWArray_ToEnumerableOfNumericArray_Array_Of_Empty_Arrays_Test()
        {
            var ik = new int[8][];

            for (int i = 0; i < 8; i++)
            {
                ik[i] = new int[] { }
            }
            ;

            Assert.That(MWArrayExtensions.ToEnumerableOfArrays <int>(new MWNumericArray(ik)), Is.EquivalentTo(ik));
        }
        public void MWArray_ToEnumerableOfNumericArray_RangeInt_to_Int_Test()
        {
            //INFO: matlab implicitne pridava jednu dimenzi !
            var ia = Enumerable.Range(1, 1000).ToArray();

            // takze [0, 1000] se zmeni na [0] = [1000]
            var res = new int[1][];

            res[0] = ia;

            Assert.That(MWArrayExtensions.ToEnumerableOfArrays <int>(new MWNumericArray(ia as Array)),
                        Is.EquivalentTo(res));
        }
        public void MWArray_ToEnumerableOfNumericArray_Bool_to_Bool_Test()
        {
            var ik = new bool[8][];

            for (int i = 0; i < 8; i++)
            {
                ik[i] = new bool[] { false, false, false, true, true, false, false, false }
            }
            ;

            // INFO: nefunguje, zahlasi chybu pri konstrukci
            //Assert.That(MWArrayExtensions.ToEnumerableOfArray<bool>(new MWLogicalArray(ik as Array)), Is.EquivalentTo(ik));
            Assert.That(MWArrayExtensions.ToEnumerableOfArrays <bool>(new MWLogicalArray(8, 8, ik.SelectMany(b => b.ToArray()).ToArray())), Is.EquivalentTo(ik));
        }
 public void MWArray_ToEnumerableOfNumericArray_Empty_Array_Test()
 {
     Assert.That(MWArrayExtensions.ToEnumerableOfArrays <int>(new MWNumericArray()), Is.EquivalentTo(Array.Empty <IEnumerable <int[]> >()));
 }
 public void MWArray_ToEnumerableOfNumericArray_ArgumentException_Test()
 {
     Assert.That(() => MWArrayExtensions.ToEnumerableOfArrays <object>(null), Throws.ArgumentNullException);
     Assert.That(() => MWArrayExtensions.ToEnumerableOfArrays <short>(MWStructArray.Empty), Throws.ArgumentException);
 }