public void TestInvalidUri() { Setup("localhost", "abc", "def", "Doors"); var provider = new UpdateServerDataProvider(config); Assert.IsFalse(provider.HasUpdateServerData); }
public void TestWrongPlatform() { Setup("http://localhost", "abc", "def", "Doors"); var provider = new UpdateServerDataProvider(config); Assert.IsFalse(provider.HasUpdateServerData); }
public void TestNoMarketplace() { Setup("http://localhost", "abc", null, "Linux"); var provider = new UpdateServerDataProvider(config); Assert.IsFalse(provider.HasUpdateServerData); }
public void TestNoKey() { Setup("http://localhost", null, "def", "Linux"); var provider = new UpdateServerDataProvider(config); Assert.IsTrue(provider.HasUpdateServerData); }
public void TestNoServer() { Setup(null, "abc", "def", "Linux"); var provider = new UpdateServerDataProvider(config); Assert.IsFalse(provider.HasUpdateServerData); }
public void TestCorrect() { Setup("http://localhost", "abc", "def", "Linux"); var provider = new UpdateServerDataProvider(config); Assert.IsTrue(provider.HasUpdateServerData); Assert.AreEqual(new Uri("http://localhost"), provider.UpdateServerUrl); Assert.AreEqual("abc", provider.UpdateKey); Assert.AreEqual("def", provider.Marketplace); Assert.AreEqual(Platforms.Linux, provider.Platform); }
public void TestPlatforms() { Setup("http://localhost", "abc", "def", "Linux"); var provider = new UpdateServerDataProvider(config); Assert.AreEqual(Platforms.Linux, provider.Platform); Setup("http://localhost", "abc", "def", "Windows"); provider = new UpdateServerDataProvider(config); Assert.AreEqual(Platforms.Windows, provider.Platform); Setup("http://localhost", "abc", "def", "MacOs"); provider = new UpdateServerDataProvider(config); Assert.AreEqual(Platforms.MacOs, provider.Platform); Setup("http://localhost", "abc", "def", "WindowsWpf"); provider = new UpdateServerDataProvider(config); Assert.AreEqual(Platforms.WindowsWpf, provider.Platform); }