Exemple #1
0
        public void FindMethodOK()
        {
            clsCustomer Customer   = new clsCustomer();
            Boolean     Found      = false;
            Int32       CustomerId = 1;

            Found = Customer.Find(CustomerId);
            Assert.IsTrue(Found);
        }
Exemple #2
0
        // END OF CUSTOMER POSTCODE

        public void FindMethodOK()
        {
            clsCustomer AnCustomer     = new clsCustomer();
            Boolean     Found          = false;
            int         CustomerNumber = 1;

            Found = AnCustomer.Find(CustomerNumber);
            Assert.IsTrue(Found);
        }
Exemple #3
0
        public void TestIsEmailConfirmedFound()
        {
            clsCustomer Customer   = new clsCustomer();
            Boolean     Found      = false;
            Boolean     OK         = true;
            Int32       CustomerId = 1;

            Found = Customer.Find(CustomerId);
            if (Customer.isEmailConfirmed != true)
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Exemple #4
0
        public void TestAddressNotFound()
        {
            clsCustomer Customer   = new clsCustomer();
            Boolean     Found      = false;
            Boolean     OK         = true;
            Int32       CustomerId = 1;

            Found = Customer.Find(CustomerId);
            if (Customer.Address != "Test Address")
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Exemple #5
0
        public void TestEmailAddressFound()
        {
            clsCustomer Customer   = new clsCustomer();
            Boolean     Found      = false;
            Boolean     OK         = true;
            Int32       CustomerId = 1;

            Found = Customer.Find(CustomerId);
            if (Customer.EmailAddress != "*****@*****.**")
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Exemple #6
0
        public void TestPassswordFound()
        {
            clsCustomer Customer   = new clsCustomer();
            Boolean     Found      = false;
            Boolean     OK         = true;
            Int32       CustomerId = 1;

            Found = Customer.Find(CustomerId);
            if (Customer.Password != "password123")
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Exemple #7
0
        public void TestNameFound()
        {
            clsCustomer Customer   = new clsCustomer();
            Boolean     Found      = false;
            Boolean     OK         = true;
            Int32       CustomerId = 1;

            Found = Customer.Find(CustomerId);
            if (Customer.Name != "Joe Doe")
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Exemple #8
0
        public void TestDateCreateAtFound()
        {
            clsCustomer Customer   = new clsCustomer();
            Boolean     Found      = false;
            Boolean     OK         = true;
            Int32       CustomerId = 1;

            Found = Customer.Find(CustomerId);
            if (Customer.CreatedAt != Convert.ToDateTime("16/09/2019"))
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Exemple #9
0
        public void TestCustomerNotFound()
        {
            clsCustomer Customer   = new clsCustomer();
            Boolean     Found      = false;
            Boolean     OK         = true;
            Int32       CustomerId = 1;

            Found = Customer.Find(CustomerId);
            if (Customer.CustomerId != 1)
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Exemple #10
0
        public void FindMethodOK()
        {
            //create an instance of the class we want to create
            clsCustomer theCustomer = new clsCustomer();
            //Boolean variable to store the results of the validation
            Boolean Found = false;
            //create some test data to use with the method
            Int32 CustomerId = 4;

            //invoe the method
            Found = theCustomer.Find(CustomerId);
            //test to see if the result is true
            Assert.IsTrue(Found);
        }
Exemple #11
0
        public void TestCustomerPostcodeFound()
        {
            clsCustomer AnCustomer     = new clsCustomer();
            Boolean     Found          = false;
            Boolean     OK             = true;
            int         CustomerNumber = 1;

            Found = AnCustomer.Find(CustomerNumber);
            if (AnCustomer.CustomerPostcode != "T35 755")
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Exemple #12
0
        public void TestCustomerDOBFound()
        {
            clsCustomer AnCustomer     = new clsCustomer();
            Boolean     Found          = false;
            Boolean     OK             = true;
            int         CustomerNumber = 1;

            Found = AnCustomer.Find(CustomerNumber);
            if (AnCustomer.CustomerDOB != Convert.ToDateTime("26/06/1990"))
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Exemple #13
0
        public void TestCustomerGenderFound()
        {
            clsCustomer AnCustomer     = new clsCustomer();
            Boolean     Found          = false;
            Boolean     OK             = true;
            int         CustomerNumber = 1;

            Found = AnCustomer.Find(CustomerNumber);
            if (AnCustomer.CustomerGender != "M")
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Exemple #14
0
        public void TestCustomerEmailFound()
        {
            clsCustomer AnCustomer     = new clsCustomer();
            Boolean     Found          = false;
            Boolean     OK             = true;
            int         CustomerNumber = 1;

            Found = AnCustomer.Find(CustomerNumber);
            if (AnCustomer.CustomerEmail != "*****@*****.**")
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
        public void FindMethodOK()
        {
            //create an instance of the class we want to create
            clsCustomer AnCustomer = new clsCustomer();
            //boolean variable to store the result of the validation
            Boolean Found = false;
            //create some test data to use with the method
            int CustomerNo = 21;

            //invoke the method
            Found = AnCustomer.Find(CustomerNo);
            //test to see that the result is correct
            Assert.IsTrue(Found);
        }
Exemple #16
0
        public void TestCustomerIdFound()
        {
            //create an instance of the class we want to create
            clsCustomer ACustomer = new clsCustomer();
            //boolean variable to store the result of the search
            Boolean Found = false;
            //boolean variable to record if data is ok
            Boolean OK = true;
            //create some test data to use with the method
            Int16 CustomerId = 1;

            //invoke the method
            Found = ACustomer.Find(CustomerId);
            //check the customer id
            if (ACustomer.CustomerId != 1)
            {
                OK = false;
            }
            //test to see that the result is correct
            Assert.IsTrue(OK);
        }
Exemple #17
0
        public void TestCustomerRegisteredDateFound()
        {
            //create an instance of the class we want to create
            clsCustomer theCustomer = new clsCustomer();
            //boolean variable to store the result of the search
            Boolean Found = false;
            //boolean variable to record if data is OK (assume it is)
            Boolean OK = true;
            //create some test data to use with the method
            Int32 CustomerId = 4;

            //invoke the method
            Found = theCustomer.Find(CustomerId);
            //check the registered date
            if (theCustomer.CustomerRegisteredDate != Convert.ToDateTime("06/05/2021"))
            {
                OK = false;
            }
            //test to see that the result is correct
            Assert.IsTrue(OK);
        }
        public void TestActiveFound()
        {
            //create an instance of the class we want to create
            clsCustomer AnCustomer = new clsCustomer();
            //boolean variable to store the result of the search
            Boolean Found = false;
            //boolean variable to record if data is OK (assume it is)
            Boolean OK = true;
            //create some test data to use with the method
            int CustomerNo = 21;

            //invoke the method
            Found = AnCustomer.Find(CustomerNo);
            //check the property
            if (AnCustomer.Active != true)
            {
                OK = false;
            }
            //test to see that the result is correct
            Assert.IsTrue(OK);
        }
Exemple #19
0
        public void TestActiveFound()
        {
            //create an instance of the class we want to create
            clsCustomer theCustomer = new clsCustomer();
            //Boolean variable to store the results of the search
            Boolean Found = false;
            //boolean variable to record if data is OK (assume it is)
            Boolean OK = true;
            //create some test data to use with method
            Int32 CustomerId = 4;

            //invoke the method
            Found = theCustomer.Find(CustomerId);
            //check the customer activity
            if (theCustomer.Active != true)
            {
                OK = false;
            }
            //test to see that the result is correct
            Assert.IsTrue(OK);
        }