public void TestGet_ValuesInBrief_Input50()
        {
            primenumberapi.Controllers.PrimeNumber     primeNumberController = new primenumberapi.Controllers.PrimeNumber();
            primenumberapi.Objects.PrimeNumberResponse primeNumberResponse   = primeNumberController.Get(50, 1, 100);

            // We need it to be True
            Assert.IsTrue(primeNumberResponse.IsSuccess);

            // Does it match the set in the brief?
            List <int> controlData = new List <int>()
            {
                2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47
            };

            Assert.AreEqual(primeNumberResponse.Numbers, controlData);
        }
        public void TestGetPaging_ValuesInBrief_Input50Page2Size6()
        {
            primenumberapi.Controllers.PrimeNumber     primeNumberController = new primenumberapi.Controllers.PrimeNumber();
            primenumberapi.Objects.PrimeNumberResponse primeNumberResponse   = primeNumberController.Get(50, 2, 6);

            // We need it to be True
            Assert.IsTrue(primeNumberResponse.IsSuccess);

            // Should return 5 items (of 15 total)

            // Does it match the set in the brief?
            List <int> controlData = new List <int>()
            {
                17, 19, 23, 29, 31, 37
            };

            Assert.AreEqual(primeNumberResponse.Numbers, controlData);
        }
        public void TestGetPaging_ValuesInBrief_Input50Page3Size6()
        {
            // This test will give a page that is not complete, it shoudln't error, and should return 3 items
            primenumberapi.Controllers.PrimeNumber     primeNumberController = new primenumberapi.Controllers.PrimeNumber();
            primenumberapi.Objects.PrimeNumberResponse primeNumberResponse   = primeNumberController.Get(50, 3, 6);

            // We need it to be True
            Assert.IsTrue(primeNumberResponse.IsSuccess);

            // Should return 5 items (of 15 total)

            // Does it match the set in the brief?
            List <int> controlData = new List <int>()
            {
                41, 43, 47
            };

            Assert.AreEqual(primeNumberResponse.Numbers, controlData);
        }
 public void TestGet_ValidMaxValue100()
 {
     primenumberapi.Controllers.PrimeNumber     primeNumberController = new primenumberapi.Controllers.PrimeNumber();
     primenumberapi.Objects.PrimeNumberResponse primeNumberResponse   = primeNumberController.Get(100, 1, 100);
     Assert.IsTrue(primeNumberResponse.IsSuccess);
 }
 public void TestGet_InvalidMaxValueZero()
 {
     primenumberapi.Controllers.PrimeNumber     primeNumberController = new primenumberapi.Controllers.PrimeNumber();
     primenumberapi.Objects.PrimeNumberResponse primeNumberResponse   = primeNumberController.Get(0, 1, 100);
     Assert.IsFalse(primeNumberResponse.IsSuccess);
 }