[6427] | 1 | #region License Information
|
---|
| 2 | /* HeuristicLab
|
---|
[12969] | 3 | * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
|
---|
[6427] | 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 |
|
---|
[6535] | 22 | using System;
|
---|
[6427] | 23 | using HeuristicLab.PluginInfrastructure.Advanced;
|
---|
| 24 | using Microsoft.VisualStudio.TestTools.UnitTesting;
|
---|
| 25 |
|
---|
[6844] | 26 | namespace HeuristicLab.PluginInfrastructure.Tests {
|
---|
[6427] | 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>
|
---|
[9771] | 36 | [TestMethod]
|
---|
[9782] | 37 | [TestCategory("General")]
|
---|
| 38 | [TestProperty("Time", "long")]
|
---|
[6427] | 39 | public void GetRemotePluginListTest() {
|
---|
| 40 | string pluginDir = Environment.CurrentDirectory;
|
---|
| 41 | try {
|
---|
| 42 | InstallationManager target = new InstallationManager(pluginDir);
|
---|
| 43 | var pluginList = target.GetRemotePluginList();
|
---|
[7353] | 44 | Assert.IsTrue(pluginList != null);
|
---|
[9782] | 45 | } catch (Exception e) {
|
---|
[6427] | 46 | Assert.Fail("Connection to the update service failed. " + e.Message);
|
---|
| 47 | }
|
---|
| 48 | }
|
---|
| 49 |
|
---|
| 50 | /// <summary>
|
---|
| 51 | ///A test for GetRemoteProductList
|
---|
| 52 | ///</summary>
|
---|
[9771] | 53 | [TestMethod]
|
---|
[9782] | 54 | [TestCategory("General")]
|
---|
| 55 | [TestProperty("Time", "short")]
|
---|
[6427] | 56 | public void GetRemoteProductListTest() {
|
---|
| 57 | string pluginDir = Environment.CurrentDirectory;
|
---|
| 58 | try {
|
---|
| 59 | InstallationManager target = new InstallationManager(pluginDir);
|
---|
| 60 | var productList = target.GetRemoteProductList();
|
---|
[7353] | 61 | Assert.IsTrue(productList != null);
|
---|
[9782] | 62 | } catch (Exception e) {
|
---|
[6427] | 63 | Assert.Fail("Connection to the update service failed. " + e.Message);
|
---|
| 64 | }
|
---|
| 65 | }
|
---|
| 66 | }
|
---|
| 67 | }
|
---|