Пример #1
0
        public void MiddleTier_ObjectParamType()
        {
            Vitalsign vs = new Vitalsign {
                IsIneligible = true
            };

            vs = WebServiceTests.GetVitalsignFromObjectParam(vs);
            List <string> strErrors = new List <string>();

            if (vs.GetType() != typeof(Vitalsign))
            {
                strErrors.Add(string.Format("The object returned is not a {0} it is a {1}.", typeof(Vitalsign), vs.GetType()));
            }
            if (vs.IsIneligible)
            {
                strErrors.Add(string.Format("The vitalsign object IsIneligible flag should be {0} but returned {1}.", "true", vs.IsIneligible.ToString()));
            }
            if (vs.Documentation != WebServiceTests.DirtyString)
            {
                strErrors.Add("The vitalsign object returned did not have the correct dirty string.");
            }
            Assert.IsTrue(strErrors.Count == 0);
        }