示例#1
0
        public void ReadTags()
        {
            FhirClient client = new FhirClient(testEndpoint);

            var tags = new List <Tag>()
            {
                new Tag("http://readtag.nu.nl", Tag.FHIRTAGSCHEME_GENERAL, "readTagTest")
            };
            var identity = ResourceIdentity.Build("Location", "1");

            client.AffixTags(identity, tags);

            var affixedEntry = client.Read(identity);
            IEnumerable <Tag> list;

            //BP/EK: Our server can't yet do this (as noted above in the history test)
            // list = client.WholeSystemTags();
            // Assert.IsTrue(list.Any(t => t.Equals(tags.First())));

            list = client.TypeTags <Location>();
            Assert.IsTrue(list.Any(t => t.Equals(tags.First())));

            list = client.Tags(affixedEntry.SelfLink);
            Assert.IsTrue(list.Any(t => t.Equals(tags.First())));

            // BP: Furore server having issues with this at present (17 April 2014)
            // causes the test to fail
            client.DeleteTags(affixedEntry.SelfLink, tags);
            //TODO: verify tags have really been removed. Should generate random tag so this is repeatable
        }
示例#2
0
        public void ReadTags()
        {
            FhirClient client = new FhirClient(testEndpoint);

            var tags = new List<Tag>() { new Tag("http://readtag.nu.nl", Tag.FHIRTAGSCHEME_GENERAL, "readTagTest") };
            var identity = ResourceIdentity.Build("Location", "1");

            client.AffixTags(identity, tags);

            var affixedEntry = client.Read(identity);
			IEnumerable<Tag> list;
			//BP/EK: Our server can't yet do this (as noted above in the history test)
			// list = client.WholeSystemTags();
            // Assert.IsTrue(list.Any(t => t.Equals(tags.First())));

            list = client.TypeTags<Location>();
            Assert.IsTrue(list.Any(t => t.Equals(tags.First())));

            list = client.Tags(affixedEntry.SelfLink);
            Assert.IsTrue(list.Any(t => t.Equals(tags.First())));

			// BP: Furore server having issues with this at present (17 April 2014)
			// causes the test to fail
            client.DeleteTags(affixedEntry.SelfLink, tags);
            //TODO: verify tags have really been removed. Should generate random tag so this is repeatable
        }