public void IsImproper_IsValidWithOneArugment()
        {
            // arrange
            Fraction fraction1 = new Fraction(3);

            Boolean expected1 = false;

            // action
            Boolean actual1 = fraction1.IsImproper();

            // assert
            Assert.AreEqual(expected1, actual1, "Invalid result with one argument.");
        }
        public void IsImproper_IsValidSameNumAndDen()
        {
            // arrange
            Fraction fraction4 = new Fraction(3,3);

            Boolean expected4 = true;

            // action
            Boolean actual4 = fraction4.IsImproper();

            // assert
            Assert.AreEqual(expected4, actual4, "Invalid result with same numerator and denominator.");
        }
        public void IsImproper_IsValidWithThreeArguments()
        {
            // arrange
            Fraction fraction3a = new Fraction(1, 2, 3);
            Fraction fraction3b = new Fraction(1, 3, 2);

            Boolean expected3a = false;
            Boolean expected3b = true;

            // action
            Boolean actual3a = fraction3a.IsImproper();
            Boolean actual3b = fraction3b.IsImproper();

            // assert
            Assert.AreEqual(expected3a, actual3a, "Invalid result with two arguments, big denominator.");
            Assert.AreEqual(expected3b, actual3b, "Invalid result with two arguments, small denominator.");
        }
        public void IsImproper_IsValidWithNegatives()
        {
            // arrange
            Fraction fraction1 = new Fraction(-4, 3);
            Fraction fraction2 = new Fraction(4, -3);
            Fraction fraction3 = new Fraction(-4, -3);
            Fraction fraction4 = new Fraction(-3, 4);

            // action
            Boolean actual1 = fraction1.IsImproper();
            Boolean actual2 = fraction2.IsImproper();
            Boolean actual3 = fraction3.IsImproper();
            Boolean actual4 = fraction4.IsImproper();

            // assert
            Assert.AreEqual(true, actual1, "Invalid result with negative numerator.");
            Assert.AreEqual(true, actual2, "Invalid result with negative denominator.");
            Assert.AreEqual(true, actual3, "Invalid result with negative numerator and denominator.");
            Assert.AreEqual(false, actual4, "Invalid result with positive numerator and denominator.");
        }
        public void IsImproper_IsValidWithTwoArguments()
        {
            // arrange
            Fraction fraction2a = new Fraction(2, 3);
            Fraction fraction2b = new Fraction(3, 2);

            Boolean expected2a = false;
            Boolean expected2b = true;

            // action
            Boolean actual2a = fraction2a.IsImproper();
            Boolean actual2b = fraction2b.IsImproper();

            // assert
            Assert.AreEqual(expected2a, actual2a, "Invalid result with two arguments, big denominator.");
            Assert.AreEqual(expected2b, actual2b, "Invalid result with two arguments, small denominator.");
        }
        /// <summary>
        /// MakeMixedNumber - Essentially calculates a Mixed Number Fraction.
        /// </summary>
        /// <param name="fraction"></param>
        /// <returns>Mixed Number Fraction.</returns>
        public static Fraction MakeMixedNumber(Fraction fraction)
        {
            // Calculate WholePart, Numerator, and Denominator for Improper Fractions
            if (fraction.IsImproper())
            { // Improper fraction
                if (fraction.Numerator % fraction.Denominator == 0)
                {  // When the numerator is divisible by the denominator
                    return new Fraction ((int)fraction.Numerator/fraction.Denominator);
                }
                else
                {

                    if( fraction.Numerator < 0 )
                    { // Apply negative sign to numerator
                        return new Fraction((int)((-1) * fraction.Numerator / fraction.Denominator),
                            (fraction.Numerator % fraction.Denominator), fraction.Denominator);
                    }
                    else{
                        return new Fraction((int)(fraction.Numerator / fraction.Denominator),
                            (fraction.Numerator % fraction.Denominator), fraction.Denominator);
                    }
                }
            }
            else
            {
                // Return regular fraction if it's a Proper Fraction or a Mixed Number Fraction
                return new Fraction(fraction.WholePart, fraction.Numerator, fraction.Denominator);
            }
        }