Example #1
0
        public void InstanceOk()
        {
            //create an instance of the class clsMovies
            clsCustomernkk AnCustomer = new clsCustomernkk();

            //check to see that the class is not null
            Assert.IsNotNull(AnCustomer);
        }
Example #2
0
        public void DateOfBirthPropertyOK()
        {
            //create an instance of the class
            clsCustomernkk ACustomer = new clsCustomernkk();
            //create some test data to assign to the property
            string SomeCustomer = "04/01/1990";

            //assign the data to the property
            ACustomer.DateOfBirth = SomeCustomer;
            //test to see that the two values are the same
            Assert.AreEqual(ACustomer.DateOfBirth, SomeCustomer);
        }
Example #3
0
        public void EmailPropertyOK()
        {
            //create an instance of the class
            clsCustomernkk ACustomer = new clsCustomernkk();
            //create some test data to assign to the property
            string SomeCustomer = "*****@*****.**";

            //assign the data to the property
            ACustomer.Email = SomeCustomer;
            //test to see that the two values are the same
            Assert.AreEqual(ACustomer.Email, SomeCustomer);
        }
Example #4
0
        public void CustomerIdPropertyOK()
        {
            //create an instance of the class we want to create
            clsCustomernkk ACustomer = new clsCustomernkk();
            //create some test data to assign to the property
            Int32 CustomerId = 1;

            //assign the data to the property
            ACustomer.CustomerId = CustomerId;
            //test to see that the two value are the same
            Assert.AreEqual(ACustomer.CustomerId, CustomerId);
        }
Example #5
0
        public void MobilePropertyOK()
        {
            //create an instance of the class
            clsCustomernkk ACustomer = new clsCustomernkk();
            //create some test data to assign to the property
            string SomeCustomer = "07896857634";

            //assign the data to the property
            ACustomer.Mobile = SomeCustomer;
            //test to see that the two values are the same
            Assert.AreEqual(ACustomer.Mobile, SomeCustomer);
        }
Example #6
0
        public void ValidMethodOk()
        {
            //create an instance of the class we want to create
            clsCustomernkk ACustomer = new clsCustomernkk();
            //create a string variable to store the result of the validation
            string Error = "";
            //create some test data to test the method
            string SomeCustomer = "James";

            //invoke the method
            Error = ACustomer.Valid(SomeCustomer);
            //test to see that the result is OK
            Assert.AreEqual(Error, "");
        }
        public void AllCustomerOK()
        {
            //create an instance of the class we want to create
            clsCustomernkkCollection Customer = new clsCustomernkkCollection();
            //create some test data to assign to the property
            //in this case the data needs to be a list of objects
            List <clsCustomernkk> TestList = new List <clsCustomernkk>();
            //add an item to the list
            //create the item of the test data
            clsCustomernkk TestItem = new clsCustomernkk();

            //set its properties
            TestItem.CustomerId  = 1;
            TestItem.Name        = "James";
            TestItem.Mobile      = "07896857634";
            TestItem.Email       = "*****@*****.**";
            TestItem.DateOfBirth = "04/01/1990";
            //add the item to the test list
            TestList.Add(TestItem);
            //assign the data to the property
            Customer.AllCustomer = TestList;
            //test to see that the two values are the same
            Assert.AreEqual(Customer.AllCustomer, TestList);
        }