//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testObject()
        public virtual void testObject()
        {
            assertEquals(1, DIST.DegreesOfFreedom, 0);
            ChiSquareDistribution other = new ChiSquareDistribution(1);

            assertEquals(DIST, other);
            assertEquals(DIST.GetHashCode(), other.GetHashCode());
            other = new ChiSquareDistribution(1, ENGINE);
            assertEquals(DIST, other);
            assertEquals(DIST.GetHashCode(), other.GetHashCode());
            other = new ChiSquareDistribution(2);
            assertFalse(other.Equals(DIST));
        }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void test()
        public virtual void test()
        {
            assertCDFWithNull(DIST);
            assertPDFWithNull(DIST);
            assertInverseCDFWithNull(DIST);
            ChiSquareDistribution dist;

            for (int i = 0; i < 5; i++)
            {
                dist = new ChiSquareDistribution(DOF[i], ENGINE);
                assertEquals(1 - dist.getCDF(X[i]), Q[i], EPS);
                assertEquals(dist.getInverseCDF(dist.getCDF(X[i])), X[i], EPS);
            }
        }
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (obj == null)
            {
                return(false);
            }
            if (this.GetType() != obj.GetType())
            {
                return(false);
            }
            ChiSquareDistribution other = (ChiSquareDistribution)obj;

            return(System.BitConverter.DoubleToInt64Bits(_degrees) == Double.doubleToLongBits(other._degrees));
        }