示例#1
0
        public void TestConfigApiKey()
        {
            TestEyes       testEyes = new TestEyes();
            IConfiguration config   = testEyes.GetConfiguration();

            config.ApiKey = "someTestApiKey";
            testEyes.SetConfiguration(config);
            testEyes.UpdateServerConnector_(); // call this instead of calling eyes.OpenBase.
            IServerConnector serverConnector = testEyes.ServerConnector;

            Assert.AreEqual("someTestApiKey", serverConnector.ApiKey, nameof(serverConnector.ApiKey));
        }
示例#2
0
        public void TestConfigServerUrl()
        {
            TestEyes       testEyes = new TestEyes();
            IConfiguration config   = testEyes.GetConfiguration();

            config.ServerUrl = "https://some.testurl.com/";
            testEyes.SetConfiguration(config);
            testEyes.UpdateServerConnector_(); // call this instead of calling eyes.OpenBase.
            IServerConnector serverConnector = testEyes.ServerConnector;

            Assert.AreEqual("https://some.testurl.com/", serverConnector.ServerUrl.AbsoluteUri, nameof(serverConnector.ServerUrl));
        }