public void TestGetCustomers()
        {
            // Act
            var result = TestContextInstance.Get();

            // Assert
            Assert.IsNotNull(result);
            Assert.AreNotEqual(result.Count(), 0);
            //
        }
        public void CustomerInitialize()
        {
            CreatedCustomer = new Customer()
            {
                FirstName = "Bella",
                LastName  = "Molavi"
            };

            TestContextInstance.Post(CreatedCustomer);
        }
        public void TestAddCustomer()
        {
            // Arrange


            // Act
            var result = TestContextInstance.Get(CreatedCustomer.CustomerId);

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual(result.CustomerId, CreatedCustomer.CustomerId);
            //
        }
        public void TestGetCustomerWithNonExistentId()
        {
            // Arrange

            var result = TestContextInstance.Get(-1);


            // Act


            //Assert
            Assert.IsNull(result);
        }
        public void CustomerCleanup()
        {
            var customer = TestContextInstance.Get()
                           .FirstOrDefault(c => c.CustomerId == CreatedCustomer.CustomerId);

            if (customer != null)
            {
                TestContextInstance.Delete(customer.CustomerId);
            }
            else
            {
                throw new Exception("Customer was not found!");
            }
        }
        public void TestUpdateCustomer()
        {
            // Arrange
            var result = TestContextInstance.Get(CreatedCustomer.CustomerId);

            result.FirstName = result.FirstName + "1";
            result.LastName  = result.LastName + "1";

            // Act
            TestContextInstance.Put(result.CustomerId, result);

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual(result.FirstName, CreatedCustomer.FirstName.ToLower(), true);
            //
        }
        public void TestGetCustomer()
        {
            // Arrange
            var customer = TestContextInstance.Get().FirstOrDefault();

            // Act
            if (customer != null)
            {
                var result = TestContextInstance.Get(customer.CustomerId);

                // Assert
                Assert.IsNotNull(result);
                Assert.AreEqual(result.CustomerId, customer.CustomerId);
            }
            else
            {
                throw new Exception("no Customer is found!");
            }

            //
        }