Example #1
0
        public static Patient NewPatient(string family, params string[] given)
        {
            Patient p = new Patient();
            HumanName n = new HumanName();
            foreach (string g in given) { n.WithGiven(g); }

            n.AndFamily(family);
            p.Name = new List<HumanName>();
            p.Name.Add(n);
            return p;
        }
Example #2
0
        public void HumanNameOnlyGivenMapTest()
        {
            var input = new HumanName();
            input.WithGiven("Pietje");

            var result = sut.Map(input);

            Assert.AreEqual(1, result.Count()); //2 line elements + city, country and postalcode.
            foreach (var res in result)
            {
                Assert.IsInstanceOfType(res, typeof(StringValue));
            }
            Assert.AreEqual(1, result.Where(r => (r as StringValue).Value == "Pietje").Count());
        }