コード例 #1
0
        public void TestSetServerUrl()
        {
            var account = new KyrioAccount();

            account.ServerUrl = "https://api.kyrio.com:8080";
            Assert.Equal("https://api.kyrio.com:8080", account.ServerUrl);

            try
            {
                account.ServerUrl = "xyz";
                Assert.True(false, "Must validate serverUrl");
            }
            catch
            {
                // Expected exception
            }

            try
            {
                account.ServerUrl = null;
                Assert.True(false, "Must validate serverUrl");
            }
            catch
            {
                // Expected exception
            }
        }
コード例 #2
0
        public void TestCreateServiceabilityClient()
        {
            var account = new KyrioAccount();

            account.ClientId = "123456";

            var client = account.CreateServiceabilityClient();

            Assert.NotNull(client);
        }
コード例 #3
0
        public void TestSetTestProperties()
        {
            var account = new KyrioAccount();

            account.ClientId = "123456";

            account.EnableTestError = true;
            Assert.True(account.EnableTestError);

            account.EnableTestMock = true;
            Assert.True(account.EnableTestMock);

            account.EnableTestLocal = true;
            Assert.True(account.EnableTestLocal);
        }