public void InjectionMessageReadSuccess()
        {
            IInjectionMessageStorage pInjectionMessageStorage = new InjectionMessageStorage();
            IInjectorStorage         pInjectorStorage         = new InjectorStorage();
            IVaccineStorage          pVaccineStorage          = new VaccineStorage();

            int pgetInjectorID = getInjectorID();
            int pgetVaccineID  = getVaccineID();

            InjectionMessage myInjectionMessage = CreateInjectionMessageForTest(
                pgetInjectorID,
                pInjectorStorage.ReadInjector(pgetInjectorID).InjectorName,
                pgetVaccineID,
                pVaccineStorage.ReadVaccine(pgetVaccineID).VaccineName,
                "某某人民医院",
                "2016-03-30",
                "陈医生");

            InjectionMessage createdInjectionMessage =
                pInjectionMessageStorage.CreateInjectionMessage(myInjectionMessage);

            Assert.AreNotEqual(
                0,
                createdInjectionMessage.InjectionMessageID,
                string.Format("Could not create InjectionMessage:{0}",
                              createdInjectionMessage.InjectionMessageID));

            InjectionMessage readedInjectionMessage = pInjectionMessageStorage.ReadInjectionMessage(
                createdInjectionMessage.InjectionMessageID);

            AssertInjectionMessageItemEqual(createdInjectionMessage, readedInjectionMessage);
        }
        public void InjectionMessageReadFailureInjectionMessageIdArgumentException()
        {
            IInjectionMessageStorage pInjectionMessageStorage = new InjectionMessageStorage();

            //InjectionMessage myInjectionMessage = CreateInjectionMessageForTest(
            //    getInjectorID(),
            //    getVaccineID(),
            //    "某某人民医院",
            //    "2016-03-30",
            //    "陈医生");

            //InjectionMessage createdInjectionMessage =
            //    pInjectionMessageStorage.CreateInjectionMessage(myInjectionMessage);
            pInjectionMessageStorage.ReadInjectionMessage(-1);
        }
        public void InjectionMessageUpdateSuccessFour()
        {
            IInjectionMessageStorage pInjectionMessageStorage = new InjectionMessageStorage();
            IInjectorStorage         pInjectorStorage         = new InjectorStorage();
            IVaccineStorage          pVaccineStorage          = new VaccineStorage();

            int pgetInjectorID = getInjectorID();
            int pgetVaccineID  = getVaccineID();

            InjectionMessage myInjectionMessage = CreateInjectionMessageForTest(
                pgetInjectorID,
                pInjectorStorage.ReadInjector(pgetInjectorID).InjectorName,
                pgetVaccineID,
                pVaccineStorage.ReadVaccine(pgetVaccineID).VaccineName,
                "某某人民医院",
                "2016-03-30",
                "陈医生");

            InjectionMessage createdInjectionMessage =
                pInjectionMessageStorage.CreateInjectionMessage(myInjectionMessage);

            Assert.AreNotEqual(
                0,
                createdInjectionMessage.InjectionMessageID,
                string.Format("Could not create InjectionMessage:{0}",
                              createdInjectionMessage.InjectionMessageID));

            myInjectionMessage.InjectionMessageTime = Convert.ToDateTime("2016-04-15");

            pInjectionMessageStorage.UpdateInjectionMessage(myInjectionMessage);

            InjectionMessage updatedInjectionMessage = pInjectionMessageStorage.ReadInjectionMessage(
                createdInjectionMessage.InjectionMessageID);

            AssertInjectionMessageItemEqual(myInjectionMessage, updatedInjectionMessage);
        }