public void GetMetadataServiceUriForRelativeMetadataUriWhenHostBaseAddressIsNullTest()
 {
     string metadataUrl = "restaurantservice/wsdl";
     StaticMetadataBehavior_Accessor target = new StaticMetadataBehavior_Accessor(metadataUrl, "c:\\host\\contracts\\restaurantservice.wsdl");
     Uri hostBaseAddress = null;
     Uri actual          = target.GetMetadataServiceUri(hostBaseAddress);
 }
 public void GetMetadataServiceUriForMalFormattedRelativeMetadataUriTest()
 {
     string metadataUrl = null;
     StaticMetadataBehavior_Accessor target = new StaticMetadataBehavior_Accessor(metadataUrl, "c:\\host\\contracts\\restaurantservice.wsdl");
     Uri hostBaseAddress = new Uri("http://www.thinktecture.com/samples/restaurantservice");
     Uri actual          = target.GetMetadataServiceUri(hostBaseAddress);
 }
 public void GetMetadataServiceUriForAbsoluteNonHttpMetadataUriTest()
 {
     string metadataUrl = "ftp://ftp.thinktecture.com/samples/schemas/restaurantservice/wsdl";
     StaticMetadataBehavior_Accessor target = new StaticMetadataBehavior_Accessor(metadataUrl, "c:\\host\\contracts\\restaurantservice.wsdl");
     Uri hostBaseAddress = new Uri("http://www.thinktecture.com/samples/restaurantservice");
     Uri actual          = target.GetMetadataServiceUri(hostBaseAddress);
 }
 public void GetMetadataServiceUriForAbsoluteMetadataUriAtSameBaseUriTest()
 {
     string metadataUrl = "http://www.thinktecture.com/samples/restaurantservice/wsdl";
     StaticMetadataBehavior_Accessor target = new StaticMetadataBehavior_Accessor(metadataUrl, "c:\\host\\contracts\\restaurantservice.wsdl");
     Uri hostBaseAddress = new Uri("http://www.thinktecture.com/samples/restaurantservice");
     Uri expected = new Uri(metadataUrl);
     Uri actual;
     actual = target.GetMetadataServiceUri(hostBaseAddress);
     Assert.AreEqual(expected, actual);
 }
        public void GetMetadataServiceUriForAbsoluteMetadataUriAtDifferentBaseUriTest()
        {
            string metadataUrl = "http://schemas.thinktecture.com/samples/restaurantservice/wsdl";
            StaticMetadataBehavior_Accessor target = new StaticMetadataBehavior_Accessor(metadataUrl, "c:\\host\\contracts\\restaurantservice.wsdl");
            Uri hostBaseAddress = new Uri("http://www.thinktecture.com/samples/restaurantservice");
            Uri expected        = new Uri(metadataUrl);
            Uri actual;

            actual = target.GetMetadataServiceUri(hostBaseAddress);
            Assert.AreEqual(expected, actual);
        }
        public void GetMetadataServiceUriForRelativeMetadataUriTest()
        {
            string metadataUrl = "metadata\\wsdl";
            StaticMetadataBehavior_Accessor target = new StaticMetadataBehavior_Accessor(metadataUrl, "c:\\host\\contracts\\restaurantservice.wsdl");
            Uri hostBaseAddress = new Uri("http://www.thinktecture.com/samples/restaurantservice");
            Uri expected        = null;

            Uri.TryCreate(hostBaseAddress, metadataUrl, out expected);
            Uri actual;

            actual = target.GetMetadataServiceUri(hostBaseAddress);
            Assert.AreEqual(expected, actual);
        }
 public void GetMetadataServiceUriForAbsoluteNonHttpMetadataUriTest()
 {
     string metadataUrl = "ftp://ftp.thinktecture.com/samples/schemas/restaurantservice/wsdl";
     StaticMetadataBehavior_Accessor target = new StaticMetadataBehavior_Accessor(metadataUrl, "c:\\host\\contracts\\restaurantservice.wsdl");
     Uri hostBaseAddress = new Uri("http://www.thinktecture.com/samples/restaurantservice");
     Uri actual = target.GetMetadataServiceUri(hostBaseAddress);
 }
 public void GetMetadataServiceUriForRelativeMetadataUriWhenHostBaseAddressIsNullTest()
 {
     string metadataUrl = "restaurantservice/wsdl";
     StaticMetadataBehavior_Accessor target = new StaticMetadataBehavior_Accessor(metadataUrl, "c:\\host\\contracts\\restaurantservice.wsdl");
     Uri hostBaseAddress = null;
     Uri actual = target.GetMetadataServiceUri(hostBaseAddress);
 }
 public void GetMetadataServiceUriForRelativeMetadataUriTest()
 {
     string metadataUrl = "metadata\\wsdl";
     StaticMetadataBehavior_Accessor target = new StaticMetadataBehavior_Accessor(metadataUrl, "c:\\host\\contracts\\restaurantservice.wsdl");
     Uri hostBaseAddress = new Uri("http://www.thinktecture.com/samples/restaurantservice");
     Uri expected = null;
     Uri.TryCreate(hostBaseAddress, metadataUrl, out expected);
     Uri actual;
     actual = target.GetMetadataServiceUri(hostBaseAddress);
     Assert.AreEqual(expected, actual);
 }
Beispiel #10
0
 public void GetMetadataServiceUriForMalFormattedRelativeMetadataUriTest()
 {
     string metadataUrl = null;
     StaticMetadataBehavior_Accessor target = new StaticMetadataBehavior_Accessor(metadataUrl, "c:\\host\\contracts\\restaurantservice.wsdl");
     Uri hostBaseAddress = new Uri("http://www.thinktecture.com/samples/restaurantservice");
     Uri actual = target.GetMetadataServiceUri(hostBaseAddress);
 }