public void InstanceOK() { //Create an instance of the class we want to create clsCourseDetails AStudent = new clsCourseDetails(); //test to see that it exists Assert.IsNotNull(AStudent); }
public void TuitionFeePropertyOK() { //create an instance of the class we want to create clsCourseDetails TestFee = new clsCourseDetails(); //create some test data to assign to the property Int32 SomeData = 9000; //assign the data to the property TestFee.Tuition = SomeData; // Test to see the values are the same Assert.AreEqual(TestFee.Tuition, SomeData); }
public void PointScorePropertyOK() { //create an instance of the class we want to create clsCourseDetails TestPoints = new clsCourseDetails(); //create some test data to assign to the property Int32 SomeData = 350; //assign the data to the property TestPoints.Points = SomeData; // Test to see the values are the same Assert.AreEqual(TestPoints.Points, SomeData); }
public void DepartmentPropertyOK() { //instance of the class clsCourseDetails TestDepartment = new clsCourseDetails(); //create some test data to assign to the property string SomeData = "computing"; //assign the data to the property TestDepartment.Department = SomeData; //test to see that the two values are the same Assert.AreEqual(TestDepartment.Department, SomeData); }
public void CourseIdPropertyOK() { //create an instance of the class we want to create clsCourseDetails TestCourseId = new clsCourseDetails(); //create some test data to assign to the property Int32 SomeData = 1002; //assign the data to the property TestCourseId.CourseId = SomeData; // Test to see the values are the same Assert.AreEqual(TestCourseId.CourseId, SomeData); }
public void ValidMethod() { //create an instance of the class we want to create clsCourseDetails ACourse = new clsCourseDetails(); //declare a variable to store the result of the validation Boolean Ok; //create some test data string CourseName = "drama"; string Department = "compu"; Int32 PointScore = 350; Int32 TuitionFee = 9000; //invoke the method Ok = ACourse.Valid(CourseName, Department, PointScore, TuitionFee); //test to see if the valid method works Assert.IsTrue(Ok); }