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); }
public void MedicationGivenMin() { clsTreatment TestTreatment = new clsTreatment(); string SomeMedication = "o"; string ExpectedReturnMsg = ""; string MedicationErrorMsg = TestTreatment.ValidateMedication(SomeMedication); Assert.AreEqual(MedicationErrorMsg, ExpectedReturnMsg); }
public void CommentsMinPlusOne() { clsTreatment TestTreatment = new clsTreatment(); string SomeComments = "Th"; string ExpectedReturnMsg = ""; string CommentsErrMsg = TestTreatment.ValidateComments(SomeComments); Assert.AreEqual(CommentsErrMsg, ExpectedReturnMsg); }
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); }
public void CommentsMax() { clsTreatment TestTreatment = new clsTreatment(); string SomeComments = ""; SomeComments = SomeComments.PadLeft(1000); string ExpectedReturnMsg = ""; string CommentsErrMsg = TestTreatment.ValidateComments(SomeComments); Assert.AreEqual(CommentsErrMsg, ExpectedReturnMsg); }
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); }
public void MedicationGivenMaxLessOne() { clsTreatment TestTreatment = new clsTreatment(); string SomeMedication = ""; SomeMedication = SomeMedication.PadLeft(49); string ExpectedReturnMsg = ""; string MedicationErrMsg = TestTreatment.ValidateMedication(SomeMedication); Assert.AreEqual(MedicationErrMsg, ExpectedReturnMsg); }
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); }
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); }
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); }
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); }