Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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);
        }