コード例 #1
0
        public void UriCanBeBuiltWithNamespace()
        {
            var builder = new EntityReferenceUrlBuilder();
            var uri     = builder.BuildEntityReferenceUri("pageName", "entityName", "entityNamespace");

            Assert.Equal("/entityNamespace/pageName/entityName", uri.ToString());
        }
コード例 #2
0
        public void NullPageNameThrows()
        {
            var builder = new EntityReferenceUrlBuilder();

            Assert.Throws <ArgumentNullException>(() => builder.BuildEntityReferenceUri(null, "entityName", "entityNamespace"));
        }
コード例 #3
0
        public void EmptyEntityNameThrows()
        {
            var builder = new EntityReferenceUrlBuilder();

            Assert.Throws <ArgumentNullException>(() => builder.BuildEntityReferenceUri("pageName", string.Empty, "entityNamespace"));
        }