- Timestamp:
- 06/16/11 14:20:48 (13 years ago)
- 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 22 using System; 23 using System.Collections.Generic; 2 24 using System.Linq; 25 using System.Threading; 3 26 using HeuristicLab.Services.Hive.Common.DataTransfer; 4 27 using HeuristicLab.Services.Hive.Common.ServiceContracts; 5 28 using HeuristicLab.Services.Hive.DataAccess; 6 29 using Microsoft.VisualStudio.TestTools.UnitTesting; 30 using DT = HeuristicLab.Services.Hive.Common.DataTransfer; 7 31 8 32 namespace HeuristicLab.Services.Hive.Tests { 9 using System.Collections.Generic;10 using System.Threading;11 using DT = HeuristicLab.Services.Hive.Common.DataTransfer;12 13 33 [TestClass] 14 34 public class DaoTests { … … 49 69 plugin1.Version = new Version("1.0.0.0"); 50 70 plugin1.UserId = Guid.Empty; 51 plugin1.IsLocal = true;52 71 plugin1.DateCreated = DateTime.Now; 53 72 … … 155 174 DT.Plugin plugin1 = new DT.Plugin(); 156 175 plugin1.DateCreated = DateTime.Now; 157 plugin1.IsLocal = false;158 176 plugin1.Name = "Tests.MyPlugin"; 159 177 plugin1.Version = new Version("1.0.0.0"); … … 168 186 Assert.AreEqual(plugin1.UserId, plugin1loaded.UserId); 169 187 Assert.AreEqual(plugin1.DateCreated.ToString(), plugin1loaded.DateCreated.ToString()); 170 Assert.AreEqual(plugin1.IsLocal, plugin1loaded.IsLocal);171 188 172 189 DT.PluginData pluginData1 = new DT.PluginData(); … … 264 281 Assert.IsTrue(Math.Abs((stats.TimeStamp - statsLoaded.TimeStamp).TotalSeconds) < 1); 265 282 266 for (int i = 0; i < slaveStats.Count; i++) {283 for (int i = 0; i < slaveStats.Count; i++) { 267 284 Assert.AreEqual(slaveStats[i].Cores, statsLoaded.SlaveStatistics.Single(x => x.SlaveId == slaveStats[i].SlaveId).Cores); 268 285 Assert.AreEqual(slaveStats[i].FreeCores, statsLoaded.SlaveStatistics.Single(x => x.SlaveId == slaveStats[i].SlaveId).FreeCores); … … 274 291 for (int i = 0; i < userStats.Count; i++) { 275 292 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); 277 294 } 278 295 -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/Mocks/MockServiceLocator.cs
r6372 r6431 49 49 } 50 50 51 public TransactionManager TransactionManager {52 get { return defaultServiceLocator.TransactionManager; }53 }54 55 51 public HeartbeatManager HeartbeatManager { 56 52 get { -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/Properties/AssemblyInfo.cs
r5078 r6431 1 1 using System.Reflection; 2 using System.Runtime.CompilerServices;3 2 using System.Runtime.InteropServices; 4 3 … … 7 6 // associated with an assembly. 8 7 [assembly: AssemblyTitle("HeuristicLab.Services.Hive.Tests")] 9 [assembly: AssemblyDescription(" ")]8 [assembly: AssemblyDescription("Unit tests for HeuristicLab.Hive services")] 10 9 [assembly: AssemblyConfiguration("")] 11 10 [assembly: AssemblyCompany("Microsoft")] -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/ServiceTests.cs
r6372 r6431 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Services.Hive.Common; 26 using HeuristicLab.Services.Hive.Common.DataTransfer; 27 using HeuristicLab.Services.Hive.Common.ServiceContracts; 25 28 using Microsoft.VisualStudio.TestTools.UnitTesting; 29 using DT = HeuristicLab.Services.Hive.Common.DataTransfer; 26 30 27 31 namespace 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 34 32 [TestClass] 35 33 public class ServiceTests { … … 73 71 plugin1.Version = new Version("1.0.0.0"); 74 72 plugin1.UserId = Guid.Empty; 75 plugin1.IsLocal = true;76 73 plugin1.DateCreated = DateTime.Now; 77 74
Note: See TracChangeset
for help on using the changeset viewer.