Esempio n. 1
0
        public void ValidateResourceWithIncorrectElement()
        {
            FhirDateTime dt = new FhirDateTime();

            dt.Value = "Ewout Kramer";

            Observation o = new Observation {
                Applies = dt
            };
            DiagnosticReport rep = new DiagnosticReport();

            rep.Contained = new List <Resource> {
                o
            };

            var errors = dt.Validate();

            Assert.IsTrue(errors.Count == 1);
        }