public void QuadraticResidue_PassedValueValue_ReturnsExpectedValues(int x, int prime, int expectedResult)
        {
            var quadraticResidueHelper = new QuadraticResidueHelper();

            var result = quadraticResidueHelper.QuadraticResidue(x, prime);

            Assert.Equal(expectedResult, result);
        }
        public void QuadraticResidue_PassedPrimeThatDoesNotFulfilConstraints_ThrowsArgumentOutOfRangeException()
        {
            const int X = 1;
            const int Prime = 12; // (constraint is: (prime - 3) % 4 == 0, so 12 fails)

            var quadraticResidueHelper = new QuadraticResidueHelper();

            Assert.Throws<ArgumentOutOfRangeException>(() => quadraticResidueHelper.QuadraticResidue(X, Prime));
        }
        public void QuadraticResidue_PassedXLargerThanPrime_ThrowsArgumentOutOfRangeException()
        {
            const int X = 12;
            const int Prime = 11;

            var quadraticResidueHelper = new QuadraticResidueHelper();

            Assert.Throws<ArgumentOutOfRangeException>(() => quadraticResidueHelper.QuadraticResidue(X, Prime));
        }