Example #1
0
        public void MiddleTier_SimulatedProcUpdate()
        {
            ProcedureCode pc = new ProcedureCode {
                Descript = "periodic oral evaluation - established patient & stuff", ProcCatDescript = "Exams & Xrays", DefaultNote = WebServiceTests.DirtyString
            };
            ProcedureCode pc2 = pc.Copy();

            WebServiceTests.SimulatedProcUpdate(pc);
            List <string> strErrors = new List <string>();

            if (pc.Descript != pc2.Descript || pc.ProcCatDescript != pc2.ProcCatDescript)
            {
                strErrors.Add(string.Format(@"The Descript before is ""{0}"" and after is ""{1}"".  The ProcCatDescript before is ""{2}"" and after is ""{3}"".", pc2.Descript, pc.Descript, pc2.ProcCatDescript, pc.ProcCatDescript));
            }
            if (pc.DefaultNote != pc2.DefaultNote)
            {
                strErrors.Add("The dirty string was altered from the simulated update call.");
            }
            Assert.IsTrue(strErrors.Count == 0);
        }