source: trunk/sources/HeuristicLab.Tests/HeuristicLab.PluginInfraStructure-3.3/InstallationManagerTest.cs @ 14185

Last change on this file since 14185 was 14185, checked in by swagner, 4 years ago

#2526: Updated year of copyrights in license headers

File size: 2.4 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
19 */
20#endregion
21
22using System;
23using HeuristicLab.PluginInfrastructure.Advanced;
24using Microsoft.VisualStudio.TestTools.UnitTesting;
25
26namespace HeuristicLab.PluginInfrastructure.Tests {
27  /// <summary>
28  ///This is a test class for InstallationManagerTest and is intended
29  ///to contain all InstallationManagerTest Unit Tests
30  ///</summary>
31  [TestClass()]
32  public class InstallationManagerTest {
33    /// <summary>
34    ///A test for GetRemotePluginList
35    ///</summary>
36    [TestMethod]
37    [TestCategory("General")]
38    [TestProperty("Time", "long")]
39    public void GetRemotePluginListTest() {
40      string pluginDir = Environment.CurrentDirectory;
41      try {
42        InstallationManager target = new InstallationManager(pluginDir);
43        var pluginList = target.GetRemotePluginList();
44        Assert.IsTrue(pluginList != null);
45      } catch (Exception e) {
46        Assert.Fail("Connection to the update service failed. " + e.Message);
47      }
48    }
49
50    /// <summary>
51    ///A test for GetRemoteProductList
52    ///</summary>
53    [TestMethod]
54    [TestCategory("General")]
55    [TestProperty("Time", "short")]
56    public void GetRemoteProductListTest() {
57      string pluginDir = Environment.CurrentDirectory;
58      try {
59        InstallationManager target = new InstallationManager(pluginDir);
60        var productList = target.GetRemoteProductList();
61        Assert.IsTrue(productList != null);
62      } catch (Exception e) {
63        Assert.Fail("Connection to the update service failed. " + e.Message);
64      }
65    }
66  }
67}
Note: See TracBrowser for help on using the repository browser.