Changeset 5158 for branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Tests/SlaveTest.cs
- Timestamp:
- 12/21/10 19:28:29 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Tests/SlaveTest.cs
r5156 r5158 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using System.ServiceModel; 25 26 using HeuristicLab.Clients.Common; 26 27 using HeuristicLab.Services.Hive.Common; … … 33 34 public class SlaveTest { 34 35 36 private static ServiceHost slaveComm; 37 private static SlaveCommListener listener; 38 35 39 // Use ClassInitialize to run code before running the first test in the class 36 40 [ClassInitialize] … … 38 42 PluginLoader.pluginAssemblies.Any(); 39 43 ServiceLocator.Instance = new MockServiceLocator(); 40 } 44 slaveComm = new ServiceHost(typeof(SlaveCommunicationService)); 45 slaveComm.Open(); 46 listener = new SlaveCommListener(); 47 listener.Open(); 48 } 49 50 [ClassCleanup] 51 public static void MyClassCleanup() { 52 listener.Close(); 53 slaveComm.Close(); 54 } 55 41 56 42 57 private List<List<MessageContainer>> CreateMsgsForSingleJob() { … … 48 63 49 64 //do nothing 65 msg = new List<MessageContainer>(); 66 allMsgs.Add(msg); 50 67 msg = new List<MessageContainer>(); 51 68 allMsgs.Add(msg); … … 68 85 List<Job> jobList = new List<Job>(); 69 86 jobList.Add(testJob); 70 MockJob job = new MockJob( 400, false);87 MockJob job = new MockJob(300, false); 71 88 72 89 using (Disposable<IHiveService> service = ServiceLocator.Instance.GetService()) { … … 74 91 ((MockHiveService)service.Obj).Messages = CreateMsgsForSingleJob(); 75 92 ((MockHiveService)service.Obj).updateJobs(jobList, job); 76 77 93 78 94 HeuristicLab.Clients.Hive.Salve.Core core = new Salve.Core();
Note: See TracChangeset
for help on using the changeset viewer.