Beispiel #1
0
        public void Uri()
        {
            var tag = new Tag { Authority = "sepia", Name = "x-test" };
            Assert.AreEqual("urn:sepia:x-test", tag.Uri);

            tag = new Tag();
            Assert.AreEqual("urn::", tag.Uri);
        }
Beispiel #2
0
 void Snippets()
 {
     #region Creating
     var cold = new Tag
     {
         Authority = "SNOMED",
         Name = "82272006",
         Description = { new Text("en", "Common cold (disorder)") }
     };
     #endregion
 }
Beispiel #3
0
        public void UriEqualityAndHashing()
        {
            var a = new Tag { Authority = "sepia", Name = "a" };
            var b = new Tag { Authority = "sepia", Name = "a" };
            var c = new Tag { Authority = "sepia", Name = "c" };
            var d = new Tag { Authority = "sepia", Name = "A" };

            Assert.AreEqual(a, b);
            Assert.AreNotEqual(a, c);
            Assert.AreEqual(a, d);

            Assert.AreEqual(a.GetHashCode(), b.GetHashCode());
            Assert.AreNotEqual(a.GetHashCode(), c.GetHashCode());
            Assert.AreEqual(a.GetHashCode(), d.GetHashCode());
        }
Beispiel #4
0
 public void NoDescriptions()
 {
     var tag = new Tag();
     Assert.IsNotNull(tag.Description);
     Assert.AreEqual(0, tag.Description.Count);
 }