Accord.Tests.Statistics.TDistributionTest.TDistributionConstructorTest C# (CSharp) 메소드

TDistributionConstructorTest() 개인적인 메소드

private TDistributionConstructorTest ( ) : void
리턴 void
        public void TDistributionConstructorTest()
        {
            int degreesOfFreedom = 4;
            TDistribution target = new TDistribution(degreesOfFreedom);
            Assert.AreEqual(degreesOfFreedom, target.DegreesOfFreedom);

            bool thrown = false;
            try { target = new TDistribution(0); }
            catch (ArgumentOutOfRangeException) { thrown = true; }
            Assert.IsTrue(thrown);

            thrown = false;
            try { target = new TDistribution(-1); }
            catch (ArgumentOutOfRangeException) { thrown = true; }
            Assert.IsTrue(thrown);
        }