Esempio n. 1
0
 public void ShouldReadProxySettingsDisabled()
 {
     using (var reader = new StringReader(Properties.Resources.FFPrefsProxyDisabled)) {
         var config = new FirefoxConfigReader();
         config.LoadConfig(reader);
         var settings = config.ProxySettings();
         Assert.AreEqual(false, settings.Enabled);
     }
 }
Esempio n. 2
0
        public void ShouldSetProxySettings()
        {
            var config = new FirefoxConfigReader();

            config.SetProxySettings(testProxy);
            var tmp = config.ProxySettings();

            Assert.AreEqual(tmp, testProxy);
        }
Esempio n. 3
0
        public void ShouldReadProxySettingsEnabled()
        {
            using (var reader = new StringReader(Properties.Resources.FFPrefs)) {
                var config = new FirefoxConfigReader();
                config.LoadConfig(reader);
                var settings = config.ProxySettings();
                Assert.AreEqual("1.1.1.1", settings.HTTP);
                Assert.AreEqual("2.2.2.2", settings.SSL);
                Assert.AreEqual("3.3.3.3", settings.FTP);
                Assert.AreEqual("4.4.4.4", settings.Socks);

                Assert.AreEqual(80, settings.HTTPPort);
                Assert.AreEqual(81, settings.SSLPort);
                Assert.AreEqual(82, settings.FTPPort);
                Assert.AreEqual(83, settings.SocksPort);

                Assert.AreEqual(false, settings.UseAdrForAll);
                Assert.AreEqual(true, settings.Enabled);
            }
        }