Exemplo n.º 1
0
        public void TestClone()
        {
            var settings = new AutoUpdateSettings
            {
                AutomaticallyInstallUpdates = true,
                CheckForUpdates             = true,
                LastChecked        = new DateTime(2017, 5, 1, 17, 30, 0),
                ProxyUsername      = "******",
                ProxyPassword      = "******",
                ProxyServer        = "myproxy",
                PluginRepositories = new [] { "tvpr://foobar:1241" }
            };
            var clone = settings.Clone();

            clone.Should().NotBeNull();
            clone.Should().NotBeSameAs(settings);
            clone.LastChecked.Should().Be(new DateTime(2017, 5, 1, 17, 30, 0));
            clone.ProxyUsername.Should().Be("user");
            clone.ProxyPassword.Should().Be("password");
            clone.ProxyServer.Should().Be("myproxy");
            clone.PluginRepositories.Should().Equal(new object[]
            {
                "tvpr://foobar:1241"
            });
        }
Exemplo n.º 2
0
        public void TestClone()
        {
            var settings = new AutoUpdateSettings
            {
                AutomaticallyInstallUpdates = true,
                CheckForUpdates             = true,
                LastChecked   = new DateTime(2017, 5, 1, 17, 30, 0),
                ProxyUsername = "******",
                ProxyPassword = "******",
                ProxyServer   = "myproxy"
            };
            var clone = settings.Clone();

            clone.Should().NotBeNull();
            clone.Should().NotBeSameAs(settings);
            clone.LastChecked.Should().Be(new DateTime(2017, 5, 1, 17, 30, 0));
            clone.ProxyUsername.Should().Be("user");
            clone.ProxyPassword.Should().Be("password");
            clone.ProxyServer.Should().Be("myproxy");
        }