Ejemplo n.º 1
0
        public void InstanceTreatmentOK()
        {
            //create an instance of the class we want to create
            clsTreatment TestTreatment = new clsTreatment();

            //test to see that the instance actually exists
            Assert.IsNotNull(TestTreatment);
        }
Ejemplo n.º 2
0
        public void MedicationGivenMin()
        {
            clsTreatment TestTreatment      = new clsTreatment();
            string       SomeMedication     = "o";
            string       ExpectedReturnMsg  = "";
            string       MedicationErrorMsg = TestTreatment.ValidateMedication(SomeMedication);

            Assert.AreEqual(MedicationErrorMsg, ExpectedReturnMsg);
        }
Ejemplo n.º 3
0
        public void CommentsMinPlusOne()
        {
            clsTreatment TestTreatment     = new clsTreatment();
            string       SomeComments      = "Th";
            string       ExpectedReturnMsg = "";
            string       CommentsErrMsg    = TestTreatment.ValidateComments(SomeComments);

            Assert.AreEqual(CommentsErrMsg, ExpectedReturnMsg);
        }
Ejemplo n.º 4
0
        public void CommentsExtremeMax()
        {
            clsTreatment TestTreatment = new clsTreatment();
            string       SomeComments  = "";

            SomeComments = SomeComments.PadLeft(3000);
            string ExpectedReturnMsg = "Comments No more than 1000 characters";
            string CommentsErrMsg    = TestTreatment.ValidateComments(SomeComments);

            Assert.AreEqual(CommentsErrMsg, ExpectedReturnMsg);
        }
Ejemplo n.º 5
0
        public void CommentsMax()
        {
            clsTreatment TestTreatment = new clsTreatment();
            string       SomeComments  = "";

            SomeComments = SomeComments.PadLeft(1000);
            string ExpectedReturnMsg = "";
            string CommentsErrMsg    = TestTreatment.ValidateComments(SomeComments);

            Assert.AreEqual(CommentsErrMsg, ExpectedReturnMsg);
        }
Ejemplo n.º 6
0
        public void MedicationGivenExtremeMax()
        {
            clsTreatment TestTreatment  = new clsTreatment();
            string       SomeMedication = "";

            SomeMedication = SomeMedication.PadLeft(500);
            string ExpectedReturnMsg = "Medication No more than 50 characters";
            string MedicationErrMsg  = TestTreatment.ValidateMedication(SomeMedication);

            Assert.AreEqual(MedicationErrMsg, ExpectedReturnMsg);
        }
Ejemplo n.º 7
0
        public void MedicationGivenMaxLessOne()
        {
            clsTreatment TestTreatment  = new clsTreatment();
            string       SomeMedication = "";

            SomeMedication = SomeMedication.PadLeft(49);
            string ExpectedReturnMsg = "";
            string MedicationErrMsg  = TestTreatment.ValidateMedication(SomeMedication);

            Assert.AreEqual(MedicationErrMsg, ExpectedReturnMsg);
        }
Ejemplo n.º 8
0
        public void MedicationGivenPropertyOK()
        {
            // create an instance of the class we want to create
            clsTreatment TestTreatment = new clsTreatment();
            //create some test data to assign to the property
            string SomeMedication = "olanzapine";

            //assign the test data to the property
            TestTreatment.MedicationGiven = SomeMedication;
            //test to see that the two values are in fact the same
            Assert.AreEqual(TestTreatment.MedicationGiven, SomeMedication);
        }
Ejemplo n.º 9
0
        public void TreatmentTypePropertyOK()
        {
            // create an instance of the class we want to create
            clsTreatment TestTreatment = new clsTreatment();
            //create some test data to assign to the property
            string SomeTreatmentType = "Physical";

            //assign the test data to the property
            TestTreatment.TreatmentType = SomeTreatmentType;
            //test to see that the two values are in fact the same
            Assert.AreEqual(TestTreatment.TreatmentType, SomeTreatmentType);
        }
Ejemplo n.º 10
0
        public void TreatmentIDPropertyOK()
        {
            //create an instance of the class we want to create
            clsTreatment TestTreatment = new clsTreatment();
            //create some test data to assign to the property
            Int32 SomeTreatmentID = 1;

            //assign the test data to the property
            TestTreatment.TreatmentID = SomeTreatmentID;
            //test to see that the two values are in fact the same
            Assert.AreEqual(TestTreatment.TreatmentID, SomeTreatmentID);
        }
Ejemplo n.º 11
0
        public void CommentsPropertyOK()
        {
            // create an instance of the class we want to create
            clsTreatment TestTreatment = new clsTreatment();
            //create some test data to assign to the property
            string SomeComments = "This treatement can trigger a heart attacks";

            //assign the test data to the property
            TestTreatment.Comments = SomeComments;
            //test to see that the two values are in fact the same
            Assert.AreEqual(TestTreatment.Comments, SomeComments);
        }