public void BlogNoMin() { //your min less than one will be 4 here clsBlog ABlog = new clsBlog(); //string variable to store any error message String Error = ""; //create some test data to pass to the method string BlogNo = "Blog1"; BlogDescription = "Blog1, hair coluring"; Email = "AdminEmail"; DateReleased = "01/02/2019"; //invoke the method Error = ABlog.Valid(BlogNo, BlogDescription, Email, DateReleased); //test to see that the result is correct Assert.AreEqual(Error, ""); }
public void BlogMinLessOne() { //create an instance of the class we want to create clsBlog ABlog = new clsBlog(); //string variable to store any error message String Error = ""; //create some test data to pass to the method string BlogNo = "Blog"; BlogDescription = "Blog1, hair coluring"; Email = "AdminEmail"; DateReleased = "01/02/2019"; //invoke the method Error = ABlog.Valid(BlogNo, BlogDescription, Email, DateReleased); //test to see that the result is correct Assert.AreNotEqual(Error, ""); }