public void InstanceOK() { //Create an instance of the class we want to create clsSubjectDetails AStudent = new clsSubjectDetails(); //test to see that it exists Assert.IsNotNull(AStudent); }
public void SubjectNamePropertyOK() { //instance of the class clsSubjectDetails TestSubjectName = new clsSubjectDetails(); //create some test data to assign to the property string SomeData = "telematics"; //assign the data to the property TestSubjectName.Subject = SomeData; //test to see that the two values are the same Assert.AreEqual(TestSubjectName.Subject, SomeData); }
public void SubjectCodeMinPlusOne() { //create an instance of the class we want to create clsSubjectDetails ASubject = new clsSubjectDetails(); //declare a variable to store the result of the validation Boolean Ok; //create some test data string SubjectCode = "ctec34055"; string SubjectName = "hujkg"; //invoke the method Ok = ASubject.Valid(SubjectCode, SubjectName); //test to see if the valid method works Assert.IsFalse(Ok); }
public void SubjectNameExtremeMax() { //create an instance of the class we want to create clsSubjectDetails ASubject = new clsSubjectDetails(); //declare a variable to store the result of the validation Boolean Ok; //create some test data string SubjectCode = "ctec3405"; string SubjectName = "dhfudjdodjdojjosdojsyudnkmolps"; //invoke the method Ok = ASubject.Valid(SubjectCode, SubjectName); //test to see if the valid method works Assert.IsFalse(Ok); }