예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
        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);
        }
예제 #5
0
        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);
        }
예제 #6
0
        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);
        }