コード例 #1
0
        public async Task RefreshAndInitializeShouldPopulateApplication()
        {
            // Given
            Assert.IsNull(m_discover.Application);

            // When
            await m_discover.RefreshAndInitializeAsync(TestHelper.ApplicationEndpointUri.ToString(), m_loggingContext).ConfigureAwait(false);

            // Given
            Assert.IsNotNull(m_discover.Application);
        }
コード例 #2
0
        public async void TestSetup()
        {
            m_restfulClient = new MockRestfulClient();
            Logger.RegisterLogger(new ConsoleLogger());
            m_loggingContext = new LoggingContext(Guid.NewGuid());
            TestHelper.InitializeTokenMapper();

            Uri    discoverUri           = TestHelper.DiscoverUri;
            Uri    baseUri               = UriHelper.GetBaseUriFromAbsoluteUri(discoverUri.ToString());
            SipUri ApplicationEndpointId = TestHelper.ApplicationEndpointUri;

            var discover = new Discover(m_restfulClient, baseUri, discoverUri, this);
            await discover.RefreshAndInitializeAsync(ApplicationEndpointId.ToString(), m_loggingContext).ConfigureAwait(false);

            m_application = discover.Application;
        }