예제 #1
0
        public Task TestQueryAppRouterAsync()
        {
            return(AVPlugins.Instance.AppRouterController.QueryAsync(CancellationToken.None).ContinueWith(t =>
            {
                Assert.IsFalse(t.IsCanceled);
                Assert.IsFalse(t.IsFaulted);

                AppRouterState state = t.Result;
                Assert.IsTrue(state.TTL != 0);
                Assert.IsNotNull(state.ApiServer);
                Assert.IsNotEmpty(state.ApiServer);
                Assert.IsNotNull(state.EngineServer);
                Assert.IsNotEmpty(state.EngineServer);
                Assert.IsNotNull(state.PushServer);
                Assert.IsNotEmpty(state.PushServer);
                Assert.IsNotNull(state.RealtimeRouterServer);
                Assert.IsNotEmpty(state.RealtimeRouterServer);
                Assert.IsNotNull(state.StatsServer);
                Assert.IsNotEmpty(state.StatsServer);
                Assert.AreEqual(state.Source, "network");
            }));
        }
예제 #2
0
        public void TestGetInitialAppRouter()
        {
            var state = AppRouterState.GetInitial("Abcdefghijklmn", AVClient.Configuration.AVRegion.Public_CN);

            Assert.AreEqual(state.ApiServer, "abcdefgh.api.lncld.net");
        }