public void DateMin() { //create an instance of the class we want to create clsCustomer Customer = new clsCustomer(); //string variable to store any error message String Error = ""; //create a variable to store the test date data DateTime TestDate; //set the date to todays date TestDate = DateTime.Now.Date; TestDate = TestDate.AddDays(1); //convert the date variable to a string variable string Date = TestDate.ToString(); //invoke the method Error = Customer.Valid(FullName, Address, PostCode, Email, Date, PhoneNumber); //test to see that the result is correct Assert.AreNotEqual(Error, ""); }
public void DateAddedMinPlusOne() { clsHotel AHotel = new clsHotel(); //create an instance of the class we want to create Boolean OK = false; //boolean variable to store the result of the validation //create some test data to pass the method string Name = "Premier Inn"; string Address = "Test Street"; string PostCode = "Le1 9BH"; string PhoneNo = "07123456789"; string RoomCapacity = "300"; DateTime TestDate; //create a variable to store the test data TestDate = DateTime.Now.Date; //set the date to todaus date TestDate = TestDate.AddDays(1); //change current time to 1 day plus string DateAdded = TestDate.ToString(); //invoke the method OK = AHotel.Valid(Name, Address, PostCode, PhoneNo, RoomCapacity, DateAdded); Assert.IsFalse(OK); //test to see that the result is correct }
public void DateOrderedMinLessOne() { clsOrder AnOrder = new clsOrder(); //string variable to store any error message String Error = ""; //create a variable to store the test date data DateTime TestDate; //set the date to today's date TestDate = DateTime.Now.Date; //change the data to whatever the date is less 1 day TestDate = TestDate.AddDays(-1); //convert the date variable to a string variable string DateOrdered = TestDate.ToString(); //invoke the method Error = AnOrder.Valid(DateOrdered, DeliveryAddress); //test to see that the result is correct Assert.AreNotEqual(Error, ""); }
public void DateMin() { //create an instance of the class we want to create clsOrder Order = new clsOrder(); //string variable to store any error message String Error = ""; //create a variable to store the test date data DateTime TestDate; //set the date to todays date TestDate = DateTime.Now.Date; TestDate = TestDate.AddDays(1); //convert the date variable to a string variable string Date = TestDate.ToString(); //invoke the method Error = Order.Valid(ProductName, ProductNo, OrderNo, Date, Price); //test to see that the result is correct Assert.AreNotEqual(Error, ""); }
public void DateJoinedExtremeMax() { //create an instance of the class we want to create clsStaff AStaff = new clsStaff(); //string variable to store any error message String Error = ""; //create a variable to store the test date data DateTime TestDate; //set the date totodays date TestDate = DateTime.Now.Date; //change the date to whatever the date is plus 1 day TestDate = TestDate.AddDays(100); //convert the date variable to a string variable string DateJoined = TestDate.ToString(); //invoke the method Error = AStaff.Valid(StaffName, StaffAddress, StaffTelNumber, DateJoined, StaffID); //test to see that the result is correct Assert.AreNotEqual(Error, ""); }
public void DateaddedMinPlusOne() { //create an instance of the class we want clsCustomer AnCustomer = new clsCustomer(); //string variable to store any error message String Error = ""; //create a variable to store the test data DateTime TestDate; //set the data to todays date TestDate = DateTime.Now.Date; //change the date to whatever the date is plus 1 day TestDate = TestDate.AddDays(1); //convert the data variable to a string variable string Dateadded = TestDate.ToString(); //invoke the method Error = AnCustomer.Valid(CustomerFirstName, CustomerLastName, CustomerUserName, Dateadded); //test to see that the results is correct Assert.AreNotEqual(Error, ""); }
public void DateMinPlusOne() { //create an instance of the class we want to create clsOrder AOrder = new clsOrder(); //string variable to store any error message String Error = ""; //create a variable to store the test date data DateTime TestDate; //set the date to todays date TestDate = DateTime.Now.Date; //change the date to plus 1 day TestDate = TestDate.AddDays(1); //convert the date variable to a string variable String Date = TestDate.ToString(); //invoke the method Error = AOrder.Valid(ItemName, Price, Quantity, Date); //test to see that the result is correct Assert.AreEqual(Error, ""); }
public void DateOfJoiningMinPlusOne() { //create an instance of the class we want to create clsStaff AStaff = new clsStaff(); //string variable to store any error message String Error = ""; //Create a variable to store the test date data DateTime TestDate; //set the date to todays date TestDate = DateTime.Now.Date; //change the date to whatever the date is tomorrow TestDate = TestDate.AddDays(1); //convert the date variable to a string variable string DateOfJoining = TestDate.ToString(); //invoke the method Error = AStaff.Valid(FullName, Salary, DateOfJoining, Position); //test to see if the result is correct Assert.AreNotEqual(Error, ""); }
public void DateAddedMinLessOne() { //create an instance of the class we want to create clsStock AStock = new clsStock(); //string variable to store any error message String Error = ""; //create a variable to store the test date data DateTime TestDate; //set the date totodays date TestDate = DateTime.Now.Date; //change the date to whatever the date is less 1 day TestDate = TestDate.AddDays(-1); //convert the date variable to a string variable string DateAdded = TestDate.ToString(); //invoke the method Error = AStock.Valid(CarModel, BHP, Price, DateAdded); //test to see that the result is correct Assert.AreNotEqual(Error, ""); }
public void Next_DeliveryMinPlusOne() { //create an instance of the class we want to create clsProduct AProduct = new clsProduct(); //string variable to store any error message String Error = ""; //create a variable to store the test date data DateTime TestDate; //set the date totodays date TestDate = DateTime.Now.Date; //change the date to whatever the date is plus 1 day TestDate = TestDate.AddDays(1); //convert the date variable to a string variable string DatNext_DeliveryeAdded = TestDate.ToString(); //invoke the method Error = AProduct.Valid(Product_ID, Name, Type, Colour, Cost, Stock_Count, Next_Delivery); //test to see that the result is correct Assert.AreEqual(Error, ""); }
public void LastPurchasedMaxPlusOne() { //create an instance of clsStock clsStock AnItem = new clsStock(); //string variable to store any error message String Error = ""; //create test data to pass to the method DateTime TestDate; //set date to Today's date TestDate = DateTime.Now.Date; //change the date to tomorrow's date TestDate = TestDate.AddDays(1); //convert the date to a string String LastPurchased = TestDate.ToString(); //invoke the method Error = AnItem.ValidLastPurchased(LastPurchased); //test to see that the result is correct Assert.AreNotEqual(Error, ""); //should fail }
public void LiveDateMinPlusOne() { //create an instance of the class we want to create clsCourses aCourse = new clsCourses(); //string variable to store any error message String Error = ""; //create a variable to store the test date data DateTime TestDate; //set the date to todays date TestDate = DateTime.Now.Date; //change the date to whatever the date is less 100 years TestDate = TestDate.AddDays(1); //convert the date variable to a string variable string LiveDate = TestDate.ToString(); //invoke the method Error = aCourse.Valid(Title, Category, Tutor, LiveDate, Price); //test to see that the result is correct Assert.AreNotEqual(Error, ""); }
public void DateAddedMinLessOne() { //create an instance of the class we want to create clsCustomer ACustomer = new clsCustomer(); //string variable to store any error message String Error = ""; //create a variable to store the test date data DateTime TestDate; //set the date totodays date TestDate = DateTime.Now.Date; //change the date to whatever the date is less 1 day TestDate = TestDate.AddDays(-1); //convert the date variable to a string variable string DateAdded = TestDate.ToString(); //invoke the method Error = ACustomer.Valid(Title, ForeName, LastName, Email, PhoneNo, DateAdded); //test to see that the result is correct Assert.AreNotEqual(Error, ""); }
public void OrderDateMinPlusOne() { //create an instance of the class clsOrder AnOrder = new clsOrder(); //string variable to store any error message String Error = ""; //create a variable to store the test date data DateTime TestDate; //set the date totodays date TestDate = DateTime.Now.Date; //change the date to whatever the date is plus 1 day TestDate = TestDate.AddDays(1); //convert the date variable to a string variable string DateAdded = TestDate.ToString(); //invoke the method Error = AnOrder.Valid(OrderDate, OrderMadeBy, TotalPrice, OrderID, CustomerID, PhoneID, TariffID); //test to see that the result is correct Assert.AreEqual(Error, ""); }
public void OrderDateMinPlusOne() { //create an instance of the class we want to create clsOrder AnOrder = new clsOrder(); //string variable to store any error messages String Error = ""; //create a variable to store the test date data DateTime TestDate; //set the date to todays date TestDate = DateTime.Now.Date; //change the date to tomorrow TestDate = TestDate.AddDays(1); //convert the date variable to a string variable string OrderDate = TestDate.ToString(); //invoke the method Error = AnOrder.Valid(CustomerID, StaffID, OrderDate, OrderStatus); //test to see that the result is correct Assert.AreNotEqual(Error, ""); }
public void CustomerCreationDateMinPlusOne() { //create instance of clsCustomer clsCustomer ACustomer = new clsCustomer(); //string variable to store any error message String Error = ""; //test data DateTime TestDate; //set the date to todays date TestDate = DateTime.Now.Date; //change the date to plus 1 day TestDate = TestDate.AddDays(1); //this should trigger an error //convert the date to variable to string variable string CustomerCreationDate = TestDate.ToString(); //invoke the method Error = ACustomer.Valid(CustomerName, CustomerEmail, CustomerPassword, CustomerCardNumber, CustomerCreationDate); //test to see that the result is correct Assert.AreNotEqual(Error, ""); }
public void StartDateMinPlusOne() { //create an instance of the class we want to create clsPolicy aPolicy = new clsPolicy(); //string variable to store any error message String Error = ""; //create a variable to store the test date data DateTime TestDate; //set the date totodays date TestDate = DateTime.Now.Date; //change the date to whatever the date is plus 1 day TestDate = TestDate.AddDays(1); //convert the date variable to a string variable string StartDate = TestDate.ToString(); //invoke the method Error = aPolicy.Valid(StaffId, CustomerId, PolicyDetails, StartDate, Price); //test to see that the result is correct Assert.AreEqual(Error, ""); }
public void DateJoinedMinPlusOne() { //create an instance of the class we want to create clsCustomer ACustomer = new clsCustomer(); //string varaible to store the results of the validation String Error = ""; //create a variable to store the test date data DateTime TestDate; //set the date to todays date TestDate = DateTime.Now.Date; //change the date to whatever the date is plus 1 day TestDate = TestDate.AddDays(1); //Convert the date variable to string variable string DateJoined = TestDate.ToString(); //invoke the method Error = ACustomer.Valid(CustomerID, CustomerName, CustomerTelNumber, CustomerAddress, DateJoined); //test to see if the results is correct Assert.AreNotEqual(Error, ""); }
public void DateAddedMinPlusOne() { //Create an instance of the class we want to create clsOrder AnOrder = new clsOrder(); //String variable to store any error message String Error = ""; //Create a variable to store the test date data DateTime TestDate; //Set the date to today's date TestDate = DateTime.Now.Date; //Change the date to whatever the date is plus 1 day TestDate = TestDate.AddDays(1); //Convert the date variable to a string variable string DateAdded = TestDate.ToString(); //Invoke the method Error = AnOrder.Valid(DateAdded, Description, ShippingAddress, Quantity); //Test to see that the result is correct Assert.AreNotEqual(Error, ""); }
public void DateAddedMinPlusOne() { // Create instance of the class clsManufacturer AnManufacturer = new clsManufacturer(); //String variable to store any error message String Error = ""; //Create a variable to store the test date data DateTime TestDate; //Set the date todays date TestDate = DateTime.Now.Date; //Change the date to whatever the date is plus 1 day TestDate = TestDate.AddDays(1); //Convert the date variable to a string variable string DateAdded = TestDate.ToString(); //Invoke the method Error = AnManufacturer.Valid(ManufacturerNo, ManufacturerName, Address, PostCode, Town, TelephoneNo, Email, DateAdded); //Test to see that the results is correct Assert.AreNotEqual(Error, ""); }
public void YearMadeMinPlusOne() { //create an instance of the class we want to create clsCar ACar = new clsCar(); //string variable to store any error message String Error = ""; //create a variable to store the test date data DateTime TestDate; //set the date totodays date TestDate = DateTime.Now.Date; //change the date to whatever the date is plus 1 day TestDate = TestDate.AddDays(1); //convert the date variable to a string variable string YearMade = TestDate.ToString(); //invoke the method Error = ACar.Valid(CarName, Model, BodyType, YearMade); //test to see that the result is correct Assert.AreEqual(Error, ""); }
public void DateOfBirthMinPlusOne() { //create an instance of the class we want to create clsStaff AStaff = new clsStaff(); //string variable to store any error message String Error = ""; //create a variable to store the test date data DateTime TestDate; //set the date totodays date TestDate = DateTime.Now.Date; //change the date to whatever the date is plus 1 day TestDate = TestDate.AddDays(1); //convert the date variable to a string variable string StaffDateOfBirth = TestDate.ToString(); //invoke the method Error = AStaff.Valid(StaffFirstName, StaffLastName, StaffEmail, StaffTelephone, StaffDateOfBirth); //test to see that the result is correct Assert.AreNotEqual(Error, ""); }
public void DateOfBirthMinPlusOne() { //create an instance of the class we want to create clsStaff AnStaff = new clsStaff(); //string variable to store any error message String Error = ""; //create a variable to store the test date data DateTime TestDate; //set the date to todays date TestDate = DateTime.Now.Date; //change the date to whatever the date is less 100 years TestDate = TestDate.AddDays(1); //comvert the date variable to a string variable string DateOfBirth = TestDate.ToString(); //invoke the method Error = AnStaff.Valid(StaffPosition, StaffID, FirstName, StartDate, DateOfBirth); //test to see that the result is correct Assert.AreNotEqual(Error, ""); }
public void DeliveryDateMid() { //create an instance of the class we want to create clsOrder AnOrder = new clsOrder(); //string variable to store any error message String Error = ""; //create a variable to store the test date data DateTime TestDate; //set the date totodays date TestDate = DateTime.Now.Date; //change the date to whatever the date is plus 1 day TestDate = TestDate.AddDays(180).AddMinutes(5555).AddSeconds(5555); //convert the date variable to a string variable string DeliveryDate = TestDate.ToString(); //invoke the method Error = AnOrder.Valid(GameTitle, TotalPrice, DeliveryDate); //test to see that the result is correct Assert.AreEqual(Error, ""); }
public void DateOfBirthMinPlusOne() { //create an instance of the class we want to create clsCustomer AnCustomer = new clsCustomer(); //string variable to store any error message String Error = ""; //create a variable to store the test date data DateTime TestDate; //set the date to todays date TestDate = DateTime.Now.Date; //change the date to whatever the date is plus 1 day TestDate = TestDate.AddDays(1); //convert the date variable to a string variable string DateOfBirth = TestDate.ToString(); //invoke the method Error = AnCustomer.Valid(Username, Password, Address, DateOfBirth); //test to see that the result is correct Assert.AreNotEqual(Error, ""); }
public void OrderDateMinLessOne() { //create an instance of the class we want to create clsOrder AnOrder = new clsOrder(); //string variable to store any error message String Error = ""; //create a variable to store the test data DateTime TestDate; //set the date to today's date TestDate = DateTime.Now.Date; //change the date to whatever the date is less 1 day TestDate = TestDate.AddDays(-1); //convert the date variable to a string variable string OrderDate = TestDate.ToString(); //invoke the method Error = AnOrder.Valid(OrderNumber, CustomerName, Email, Quantity, OrderDate, TrackingNumber); //test to see that the result is correct Assert.AreNotEqual(Error, ""); }
public void DateAddedMinPlusOne() { //create an instance of the class we want to create clsStock AnStock = new clsStock(); //string variable to store any error message String Error = ""; //create a variable to store the test date data DateTime TestDate; //set the test datetotodays date TestDate = DateTime.Now.Date; //change the date to whatever the date is plus 1 day TestDate = TestDate.AddDays(1); //convert the date variable to a string Variable String DateAdded = TestDate.ToString(); //invoke the method Error = AnStock.Valid(ClothesDescription, ClothesColour, DateAdded, Price); //test to see that the result is correct Assert.AreNotEqual(Error, ""); }
public void OrderDateExtremeMax() { //create an instance of the class we want to create clsOrder AnOrder = new clsOrder(); //string variable to store any error message String Error = ""; //create a variable to store the test date data DateTime TestDate; //set the date totodays date TestDate = DateTime.Now.Date; //change the date to whatever the date is plus 100 years TestDate = TestDate.AddDays(100); //convert the date variable to a string variable string DateAdded = TestDate.ToString(); //invoke the method Error = AnOrder.Valid(OrderNumber, CustomerName, Email, Quantity, ShippingDate, TrackingNumber); //test to see that the result is correct Assert.AreEqual(Error, ""); }
public void PickupTimeMinPlusOne() { //create an instance of the class we want to create clsDestination AnDestination = new clsDestination(); //string variable to store any error message String Error = ""; //create a variable to store the test date data DateTime TestDate; //set the date to todays date TestDate = DateTime.Now.Date; //change the date to whatever the date is less 1 day TestDate = TestDate.AddDays(1); //convert the data variable to a string variable string PickupTime = TestDate.ToString(); //invoke the method Error = AnDestination.Valid(EndPointHouseNo, EndPointPostCode, EndPointStreet, EndPointTown, PickupTime); //test to see that the result is correct Assert.AreEqual(Error, ""); }
public void SignUpDateMinPlusOne() { //create an instance of the class we want to create clsCustomer AnCustomer = new clsCustomer(); //string variable to store any error message String Error = ""; //create a variable to store the test date data DateTime TestDate; //set the date to todays date TestDate = DateTime.Now.Date; //change the date to whatever the date is less 100 years TestDate = TestDate.AddDays(1); //comvert the date variable to a string variable string SignUpDate = TestDate.ToString(); //invoke the method Error = AnCustomer.Valid(CustomerAddress, CustomerPayment, SignUpDate, DateOfBirth); //test to see that the resutl is correct Assert.AreNotEqual(Error, ""); }