コード例 #1
0
        public void _03_TestFailureOnFirstRegistry()
        {
            AdvancedUddiDummyClient.AdvancedUddiDummyClientConfig config = GetClearDummyConfig();
            config.ErroneousEndpoints.Add(firstRegistry);
            config.ErroneousEndpoints.Add(firstFallback);
            IUddiLookupClient         client = new RegistryLookupClientFactory().CreateUddiLookupClient();
            List <UddiLookupResponse> result = null;

            Assert.Throws <UddiException>(() => result = client.Lookup(CreateParams(endpointInFirstRegistry)));
        }
コード例 #2
0
        public void _01_TestSuccesfulOnFirstLookup()
        {
            GetClearDummyConfig();
            IUddiLookupClient         client = new RegistryLookupClientFactory().CreateUddiLookupClient();
            List <UddiLookupResponse> result = client.Lookup(CreateParams(endpointInFirstRegistry));

            Assert.IsNotNull(result);
            Assert.IsNotEmpty(result);
            Assert.AreEqual(firstRegistry.ToString(), result[0].EndpointAddress.GetKeyAsString());
        }
コード例 #3
0
        public void _02_TestSuccesfulOnFirstFallback()
        {
            AdvancedUddiDummyClient.AdvancedUddiDummyClientConfig config = GetClearDummyConfig();
            config.ErroneousEndpoints.Add(firstRegistry);
            IUddiLookupClient         client = new RegistryLookupClientFactory().CreateUddiLookupClient();
            List <UddiLookupResponse> result = client.Lookup(CreateParams(endpointInFirstRegistry));

            Assert.IsNotNull(result);
            Assert.IsNotEmpty(result);
            Assert.AreEqual(firstFallback.ToString(), result[0].EndpointAddress.GetKeyAsString());
        }
コード例 #4
0
        public void _04_TestSuccesfulOnSecondRegistry()
        {
            AdvancedUddiDummyClient.AdvancedUddiDummyClientConfig config = GetClearDummyConfig();
            config.NonExistingRegistrations.Add(firstRegistry, new List <Identifier> {
                endpointInSecondRegistry
            });
            IUddiLookupClient         client = new RegistryLookupClientFactory().CreateUddiLookupClient();
            List <UddiLookupResponse> result = client.Lookup(CreateParams(endpointInSecondRegistry));

            Assert.IsNotNull(result);
            Assert.IsNotEmpty(result);
            Assert.AreEqual(secondRegistry.ToString(), result[0].EndpointAddress.GetKeyAsString());
        }
コード例 #5
0
        public void _06_TestUnsuccesfulOnAllRegistries()
        {
            AdvancedUddiDummyClient.AdvancedUddiDummyClientConfig config = GetClearDummyConfig();
            config.NonExistingRegistrations.Add(firstRegistry, new List <Identifier> {
                endpointInNoRegistry
            });
            config.NonExistingRegistrations.Add(secondRegistry, new List <Identifier> {
                endpointInNoRegistry
            });
            config.NonExistingRegistrations.Add(thirdRegistry, new List <Identifier> {
                endpointInNoRegistry
            });
            config.NonExistingRegistrations.Add(fourthRegistry, new List <Identifier> {
                endpointInNoRegistry
            });

            IUddiLookupClient         client = new RegistryLookupClientFactory().CreateUddiLookupClient();
            List <UddiLookupResponse> result = client.Lookup(CreateParams(endpointInNoRegistry));

            Assert.IsEmpty(result);
        }