コード例 #1
0
        public void BasicObjectRendersNamespaces()
        {
            var obj      = new OpenGraphObject("my super title", new Uri("http://test.org/my-super-title"));
            var expected = " xmlns:og=\"http://ogp.me/ns#\" ";

            Assert.AreEqual(expected, obj.ToHtmlAttributeNamespaces());
        }
コード例 #2
0
        public void RendersMultipleNamespaces()
        {
            var obj = new OpenGraphObject("my super title", new Uri("http://test.org/my-super-title"));

            obj.Add(new OpenGraphTag(new OpenGraphName("key", "xxx", "http://xxx/aaa/#"), "value"));
            var expected = " xmlns:og=\"http://ogp.me/ns#\"  xmlns:xxx=\"http://xxx/aaa/#\" ";

            Assert.AreEqual(expected, obj.ToHtmlAttributeNamespaces());
        }