Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/16/11 14:20:48 (13 years ago)
Author:
cneumuel
Message:

#1233

  • changed Log to ThreadSafeLog
  • added license information to all files
  • added assembly descriptions
  • using blocks before namespace
  • made TransactionManager static
  • removed DaoException
  • removed TimeSpanExtensions
  • renamed prepareHiveDatabase.sql should be renamed to Prepare Hive Database.sql
  • created Initialize Hive Database.sql
Location:
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/DaoTests.cs

    r6267 r6431  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2011 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 System.Collections.Generic;
    224using System.Linq;
     25using System.Threading;
    326using HeuristicLab.Services.Hive.Common.DataTransfer;
    427using HeuristicLab.Services.Hive.Common.ServiceContracts;
    528using HeuristicLab.Services.Hive.DataAccess;
    629using Microsoft.VisualStudio.TestTools.UnitTesting;
     30using DT = HeuristicLab.Services.Hive.Common.DataTransfer;
    731
    832namespace HeuristicLab.Services.Hive.Tests {
    9   using System.Collections.Generic;
    10   using System.Threading;
    11   using DT = HeuristicLab.Services.Hive.Common.DataTransfer;
    12 
    1333  [TestClass]
    1434  public class DaoTests {
     
    4969      plugin1.Version = new Version("1.0.0.0");
    5070      plugin1.UserId = Guid.Empty;
    51       plugin1.IsLocal = true;
    5271      plugin1.DateCreated = DateTime.Now;
    5372
     
    155174      DT.Plugin plugin1 = new DT.Plugin();
    156175      plugin1.DateCreated = DateTime.Now;
    157       plugin1.IsLocal = false;
    158176      plugin1.Name = "Tests.MyPlugin";
    159177      plugin1.Version = new Version("1.0.0.0");
     
    168186      Assert.AreEqual(plugin1.UserId, plugin1loaded.UserId);
    169187      Assert.AreEqual(plugin1.DateCreated.ToString(), plugin1loaded.DateCreated.ToString());
    170       Assert.AreEqual(plugin1.IsLocal, plugin1loaded.IsLocal);
    171188
    172189      DT.PluginData pluginData1 = new DT.PluginData();
     
    264281      Assert.IsTrue(Math.Abs((stats.TimeStamp - statsLoaded.TimeStamp).TotalSeconds) < 1);
    265282
    266       for (int i = 0; i  < slaveStats.Count; i ++) {
     283      for (int i = 0; i < slaveStats.Count; i++) {
    267284        Assert.AreEqual(slaveStats[i].Cores, statsLoaded.SlaveStatistics.Single(x => x.SlaveId == slaveStats[i].SlaveId).Cores);
    268285        Assert.AreEqual(slaveStats[i].FreeCores, statsLoaded.SlaveStatistics.Single(x => x.SlaveId == slaveStats[i].SlaveId).FreeCores);
     
    274291      for (int i = 0; i < userStats.Count; i++) {
    275292        Assert.AreEqual(userStats[i].ExecutionTime, statsLoaded.UserStatistics.Single(x => x.UserId == userStats[i].UserId).ExecutionTime);
    276         Assert.AreEqual(userStats[i].UsedCores, statsLoaded.UserStatistics.Single(x => x.UserId == userStats[i].UserId).UsedCores);       
     293        Assert.AreEqual(userStats[i].UsedCores, statsLoaded.UserStatistics.Single(x => x.UserId == userStats[i].UserId).UsedCores);
    277294      }
    278295
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/Mocks/MockServiceLocator.cs

    r6372 r6431  
    4949    }
    5050
    51     public TransactionManager TransactionManager {
    52       get { return defaultServiceLocator.TransactionManager; }
    53     }
    54 
    5551    public HeartbeatManager HeartbeatManager {
    5652      get {
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/Properties/AssemblyInfo.cs

    r5078 r6431  
    11using System.Reflection;
    2 using System.Runtime.CompilerServices;
    32using System.Runtime.InteropServices;
    43
     
    76// associated with an assembly.
    87[assembly: AssemblyTitle("HeuristicLab.Services.Hive.Tests")]
    9 [assembly: AssemblyDescription("")]
     8[assembly: AssemblyDescription("Unit tests for HeuristicLab.Hive services")]
    109[assembly: AssemblyConfiguration("")]
    1110[assembly: AssemblyCompany("Microsoft")]
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/ServiceTests.cs

    r6372 r6431  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Services.Hive.Common;
     26using HeuristicLab.Services.Hive.Common.DataTransfer;
     27using HeuristicLab.Services.Hive.Common.ServiceContracts;
    2528using Microsoft.VisualStudio.TestTools.UnitTesting;
     29using DT = HeuristicLab.Services.Hive.Common.DataTransfer;
    2630
    2731namespace HeuristicLab.Services.Hive.Tests {
    28 
    29   using HeuristicLab.Services.Hive.Common;
    30   using HeuristicLab.Services.Hive.Common.DataTransfer;
    31   using HeuristicLab.Services.Hive.Common.ServiceContracts;
    32   using DT = HeuristicLab.Services.Hive.Common.DataTransfer;
    33 
    3432  [TestClass]
    3533  public class ServiceTests {
     
    7371      plugin1.Version = new Version("1.0.0.0");
    7472      plugin1.UserId = Guid.Empty;
    75       plugin1.IsLocal = true;
    7673      plugin1.DateCreated = DateTime.Now;
    7774
Note: See TracChangeset for help on using the changeset viewer.