예제 #1
0
        public void ReadTags()
        {
            FhirClient client = new FhirClient(testEndpoint);

            var tags = new List <Tag>()
            {
                new Tag("http://readtag.nu.nl", "readTagTest")
            };

            client.AffixTags(tags, ResourceType.Location, "1");

            var list = client.GetTags();

            Assert.IsTrue(list.Any(t => t == tags.First()));

            list = client.GetTags(ResourceType.Location);
            Assert.IsTrue(list.Any(t => t == tags.First()));

            list = client.GetTags(ResourceType.Location, "1", "1");
            Assert.IsTrue(list.Any(t => t == tags.First()));

            client.DeleteTags(tags, ResourceType.Location, "1", "1");

            list = client.GetTags();
            Assert.IsFalse(list.Any(t => t == tags.First()));
        }
예제 #2
0
        public void GetServerWideTags()
        {
            IEnumerable <Tag> tags = null;

            HttpTests.AssertSuccess(client, () => tags = client.GetTags());

            var tagStrings = tags.FilterFhirTags().Where(t => t.Term != null).Select(t => t.Term);

            if (!tagStrings.Contains(NUTAG) || !tagStrings.Contains(OTHERTAG))
            {
                TestResult.Fail("expected tags not found in server-wide tag list");
            }
        }
예제 #3
0
        public void ReadTags()
        {
            FhirClient client = new FhirClient(testEndpoint);

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

            client.AffixTags <Location>(tags, "1");
            var affixedEntry = client.Read <Location>("1");
            var version      = new ResourceIdentity(affixedEntry.SelfLink).VersionId;
            var list         = client.GetTags();

            Assert.IsTrue(list.Any(t => t.Equals(tags.First())));

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

            list = client.GetTags <Location>("1", version);
            Assert.IsTrue(list.Any(t => t.Equals(tags.First())));

            client.DeleteTags <Location>(tags, "1", version);
        }
예제 #4
0
        public void ReadTags()
        {
            FhirClient client = new FhirClient(testEndpoint);

            var tags = new List<Tag>() { new Tag("http://readtag.nu.nl", Tag.FHIRTAGNS, "readTagTest") };

            client.AffixTags(tags, ResourceType.Location, "1");

            var list = client.GetTags();
            Assert.IsTrue(list.Any(t => t == tags.First()));

            list = client.GetTags(ResourceType.Location);
            Assert.IsTrue(list.Any(t => t == tags.First()));

            list = client.GetTags(ResourceType.Location, "1", "1");
            Assert.IsTrue(list.Any(t => t == tags.First()));

            client.DeleteTags(tags, ResourceType.Location, "1", "1");

            list = client.GetTags();
            Assert.IsFalse(list.Any(t => t == tags.First()));
        }