Пример #1
0
        public void Reset()
        {
            ISettings settings = new DefaultSettings {
                AttachToBrowserTimeOut = 111
            };

            var autoCloseDialogs = !settings.AutoCloseDialogs;

            settings.AutoCloseDialogs = autoCloseDialogs;
            settings.HighLightColor   = "strange color";
            var highLightElement = !settings.HighLightElement;

            settings.HighLightElement       = highLightElement;
            settings.WaitForCompleteTimeOut = 222;
            settings.WaitUntilExistsTimeOut = 333;
            settings.SleepTime = 444;

            var settingsClone = settings.Clone();

            Assert.AreEqual(111, settingsClone.AttachToBrowserTimeOut, "Unexpected AttachToBrowserTimeOut");
            Assert.AreEqual(autoCloseDialogs, settingsClone.AutoCloseDialogs, "Unexpected AutoCloseDialogs");
            Assert.AreEqual("strange color", settingsClone.HighLightColor, "Unexpected HighLightColor");
            Assert.AreEqual(highLightElement, settingsClone.HighLightElement, "Unexpected HighLightElement");
            Assert.AreEqual(222, settingsClone.WaitForCompleteTimeOut, "Unexpected WaitForCompleteTimeOut");
            Assert.AreEqual(333, settingsClone.WaitUntilExistsTimeOut, "Unexpected WaitUntilExistsTimeOut");
            Assert.AreEqual(444, settingsClone.SleepTime, "Unexpected SleepTime");

            settingsClone.Reset();
            AssertDefaults(settingsClone);
        }
Пример #2
0
        protected internal Assembly GetAssembly(Type type)
        {
            ProxySettings settings = DefaultSettings.Clone();

            settings.ServiceType    = type;
            settings.DownloadClient = false;
            return(GetAssembly(settings));
        }
Пример #3
0
        protected internal Assembly GetAssembly(Type type, string hostName, int port = 9100, HashSet <Assembly> addedReferenceAssemblies = null)
        {
            ProxySettings settings = DefaultSettings.Clone();

            settings.ServiceType    = type;
            settings.DownloadClient = true;
            settings.Host           = hostName;
            settings.Port           = port;
            return(GetAssembly(settings, addedReferenceAssemblies));
        }
Пример #4
0
        protected internal Assembly GetAssembly(Type type, string hostName, int port = 9100)
        {
            ProxySettings settings = DefaultSettings.Clone();

            settings.ServiceType    = type;
            settings.DownloadClient = true;
            settings.Host           = hostName;
            settings.Port           = port;
            return(GetAssembly(settings));
        }
        public void ChangeSettingInCloneShouldNotChangeOriginalSetting()
        {
            ISettings settings = new DefaultSettings {AttachToBrowserTimeOut = 111};

            var settingsClone = settings.Clone();
            Assert.AreEqual(111, settingsClone.AttachToBrowserTimeOut, "Unexpected clone 1");

            settingsClone.AttachToBrowserTimeOut = 222;

            Assert.AreEqual(111, settings.AttachToBrowserTimeOut, "Unexpected original");
            Assert.AreEqual(222, settingsClone.AttachToBrowserTimeOut, "Unexpected clone 2");
        }
Пример #6
0
        public void ChangeSettingInCloneShouldNotChangeOriginalSetting()
        {
            ISettings settings = new DefaultSettings {
                AttachToBrowserTimeOut = 111
            };

            var settingsClone = settings.Clone();

            Assert.AreEqual(111, settingsClone.AttachToBrowserTimeOut, "Unexpected clone 1");

            settingsClone.AttachToBrowserTimeOut = 222;

            Assert.AreEqual(111, settings.AttachToBrowserTimeOut, "Unexpected original");
            Assert.AreEqual(222, settingsClone.AttachToBrowserTimeOut, "Unexpected clone 2");
        }
        public void Clone()
        {
            ISettings settings = new DefaultSettings {AttachToBrowserTimeOut = 111};

            var autoCloseDialogs = !settings.AutoCloseDialogs;
            settings.AutoCloseDialogs = autoCloseDialogs;
            settings.HighLightColor = "strange color";
            var highLightElement = !settings.HighLightElement;
            settings.HighLightElement = highLightElement;
            settings.WaitForCompleteTimeOut = 222;
            settings.WaitUntilExistsTimeOut = 333;
            settings.SleepTime = 444;

            var settingsClone = settings.Clone();
            Assert.AreEqual(111, settingsClone.AttachToBrowserTimeOut, "Unexpected AttachToBrowserTimeOut");
            Assert.AreEqual(autoCloseDialogs, settingsClone.AutoCloseDialogs, "Unexpected AutoCloseDialogs");
            Assert.AreEqual("strange color", settingsClone.HighLightColor, "Unexpected HighLightColor");
            Assert.AreEqual(highLightElement, settingsClone.HighLightElement, "Unexpected HighLightElement");
            Assert.AreEqual(222, settingsClone.WaitForCompleteTimeOut, "Unexpected WaitForCompleteTimeOut");
            Assert.AreEqual(333, settingsClone.WaitUntilExistsTimeOut, "Unexpected WaitUntilExistsTimeOut");
            Assert.AreEqual(444, settingsClone.SleepTime, "Unexpected SleepTime");
        }
Пример #8
0
 protected RowCollection()
 {
     this.Items    = new List <RowConf>();
     this.Settings = DefaultSettings.Clone();
 }
Пример #9
0
 public static MonoTlsSettings CopyDefaultSettings()
 {
     return DefaultSettings.Clone ();
 }