Accord.Tests.Statistics.IndependentTest.FittingNoOptionsTest C# (CSharp) Method

FittingNoOptionsTest() private method

private FittingNoOptionsTest ( ) : void
return void
        public void FittingNoOptionsTest()
        {
            double[][] data1 =
            {
                new double[] { 0, 8 },
                new double[] { 0, 6 },
                new double[] { 0, 7 },
                new double[] { 0, 9 },
            };

            double[][] data2 =
            {
                new double[] { 8, 0 },
                new double[] { 6, 0 },
                new double[] { 7, 0 },
                new double[] { 9, 0 },
            };


            var p1 = new NormalDistribution(0, 1);
            var p2 = new NormalDistribution(0, 1);

            bool thrown1 = false;
            bool thrown2 = false;

            try
            {
                var target = new Independent<NormalDistribution>(p1, p2);
                target.Fit(data1);
            }
            catch (ArgumentException)
            {
                thrown1 = true;
            }

            try
            {
                var target = new Independent<NormalDistribution>(p1, p2);
                target.Fit(data2);
            }
            catch (ArgumentException)
            {
                thrown2 = true;
            }

            Assert.IsTrue(thrown1);
            Assert.IsTrue(thrown2);
        }