Index: /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.ConsoleClient-3.4/HeuristicLab.Clients.Hive.Slave.ConsoleClient-3.4.csproj
===================================================================
--- /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.ConsoleClient-3.4/HeuristicLab.Clients.Hive.Slave.ConsoleClient-3.4.csproj	(revision 5157)
+++ /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.ConsoleClient-3.4/HeuristicLab.Clients.Hive.Slave.ConsoleClient-3.4.csproj	(revision 5158)
@@ -58,5 +58,4 @@
     <Compile Include="Program.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="SlaveCommListener.cs" />
   </ItemGroup>
   <ItemGroup>
Index: anches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.ConsoleClient-3.4/SlaveCommListener.cs
===================================================================
--- /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.ConsoleClient-3.4/SlaveCommListener.cs	(revision 5157)
+++ 	(revision )
@@ -1,67 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.ServiceModel;
-using HeuristicLab.Clients.Hive.Slave.ServiceContracts;
-
-namespace HeuristicLab.Clients.Hive.Slave.ConsoleClient {
-
-  /// <summary>
-  /// mock a client, simply print out messages
-  /// </summary>
-  [CallbackBehavior(ConcurrencyMode = ConcurrencyMode.Reentrant)]
-  class SlaveCommListener : ISlaveCommunicationCallbacks, IDisposable {
-    ISlaveCommunication pipeProxy;
-    DuplexChannelFactory<ISlaveCommunication> pipeFactory;
-
-    public void Open() {
-      //TODO: read info from app.config
-      pipeFactory = new DuplexChannelFactory<ISlaveCommunication>(this,
-        new NetNamedPipeBinding(), new EndpointAddress("net.pipe://localhost/HeuristicLabSlaveCom"));
-
-      pipeProxy = pipeFactory.CreateChannel();
-      pipeProxy.Subscribe();
-    }
-
-    public void Close() {
-      pipeProxy.Unsubscribe();
-      if (pipeFactory.State != CommunicationState.Closed)
-        pipeFactory.Close();
-    }
-
-    public void OnStatusChanged(Salve.StatusCommons status) {
-      System.Console.WriteLine("SlaveCommListener: " + status);
-    }
-
-    public void OnMessageLogged(string message) {
-      System.Console.WriteLine("SlaveCommListener: " + message);
-    }
-
-    public void OnShutdown() {
-      System.Console.WriteLine("SlaveCommListner: Slave quit");
-    }
-
-    public void Dispose() {
-      Close();
-    }
-  }
-}
Index: /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Tests/HeuristicLab.Clients.Hive.Slave.Tests-3.4.csproj
===================================================================
--- /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Tests/HeuristicLab.Clients.Hive.Slave.Tests-3.4.csproj	(revision 5157)
+++ /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Tests/HeuristicLab.Clients.Hive.Slave.Tests-3.4.csproj	(revision 5158)
@@ -298,4 +298,5 @@
     </Reference>
     <Reference Include="System.Drawing" />
+    <Reference Include="System.ServiceModel" />
     <Reference Include="WeifenLuo.WinFormsUI.Docking-2.3.1">
       <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\WeifenLuo.WinFormsUI.Docking-2.3.1.dll</HintPath>
@@ -313,4 +314,5 @@
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Mocks\MockServiceLocator.cs" />
+    <Compile Include="SlaveCommListener.cs" />
     <Compile Include="SlaveTest.cs" />
   </ItemGroup>
@@ -333,4 +335,7 @@
     </ProjectReference>
   </ItemGroup>
+  <ItemGroup>
+    <None Include="app.config" />
+  </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
Index: /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Tests/SlaveCommListener.cs
===================================================================
--- /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Tests/SlaveCommListener.cs	(revision 5158)
+++ /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Tests/SlaveCommListener.cs	(revision 5158)
@@ -0,0 +1,67 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.ServiceModel;
+using HeuristicLab.Clients.Hive.Slave.ServiceContracts;
+
+namespace HeuristicLab.Clients.Hive.Slave.Tests {
+
+  /// <summary>
+  /// mock a client, simply print out messages
+  /// </summary>
+  [CallbackBehavior(ConcurrencyMode = ConcurrencyMode.Reentrant)]
+  public class SlaveCommListener : ISlaveCommunicationCallbacks, IDisposable {
+    ISlaveCommunication pipeProxy;
+    DuplexChannelFactory<ISlaveCommunication> pipeFactory;
+
+    public void Open() {
+      //TODO: read info from app.config
+      pipeFactory = new DuplexChannelFactory<ISlaveCommunication>(this,
+        new NetNamedPipeBinding(), new EndpointAddress("net.pipe://localhost/HeuristicLabSlaveCom"));
+
+      pipeProxy = pipeFactory.CreateChannel();
+      pipeProxy.Subscribe();
+    }
+
+    public void Close() {
+      pipeProxy.Unsubscribe();
+      if (pipeFactory.State != CommunicationState.Closed)
+        pipeFactory.Close();
+    }
+
+    public void OnStatusChanged(Salve.StatusCommons status) {
+      System.Console.WriteLine("SlaveCommListener: " + status);
+    }
+
+    public void OnMessageLogged(string message) {
+      System.Console.WriteLine("SlaveCommListener: " + message);
+    }
+
+    public void OnShutdown() {
+      System.Console.WriteLine("SlaveCommListner: Slave quit");
+    }
+
+    public void Dispose() {
+      Close();
+    }
+  }
+}
Index: /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Tests/SlaveTest.cs
===================================================================
--- /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Tests/SlaveTest.cs	(revision 5157)
+++ /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Tests/SlaveTest.cs	(revision 5158)
@@ -23,4 +23,5 @@
 using System.Collections.Generic;
 using System.Linq;
+using System.ServiceModel;
 using HeuristicLab.Clients.Common;
 using HeuristicLab.Services.Hive.Common;
@@ -33,4 +34,7 @@
   public class SlaveTest {
 
+    private static ServiceHost slaveComm;
+    private static SlaveCommListener listener;
+
     // Use ClassInitialize to run code before running the first test in the class
     [ClassInitialize]
@@ -38,5 +42,16 @@
       PluginLoader.pluginAssemblies.Any();
       ServiceLocator.Instance = new MockServiceLocator();
-    }
+      slaveComm = new ServiceHost(typeof(SlaveCommunicationService));
+      slaveComm.Open();
+      listener = new SlaveCommListener();
+      listener.Open();
+    }
+
+    [ClassCleanup]
+    public static void MyClassCleanup() {
+      listener.Close();
+      slaveComm.Close();
+    }
+
 
     private List<List<MessageContainer>> CreateMsgsForSingleJob() {
@@ -48,4 +63,6 @@
 
       //do nothing
+      msg = new List<MessageContainer>();
+      allMsgs.Add(msg);
       msg = new List<MessageContainer>();
       allMsgs.Add(msg);
@@ -68,5 +85,5 @@
       List<Job> jobList = new List<Job>();
       jobList.Add(testJob);
-      MockJob job = new MockJob(400, false);
+      MockJob job = new MockJob(300, false);
 
       using (Disposable<IHiveService> service = ServiceLocator.Instance.GetService()) {
@@ -74,5 +91,4 @@
         ((MockHiveService)service.Obj).Messages = CreateMsgsForSingleJob();
         ((MockHiveService)service.Obj).updateJobs(jobList, job);
-
 
         HeuristicLab.Clients.Hive.Salve.Core core = new Salve.Core();
Index: /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Tests/app.config
===================================================================
--- /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Tests/app.config	(revision 5158)
+++ /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Tests/app.config	(revision 5158)
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<configuration>
+   
+  <system.serviceModel>
+    <services>
+      <service name="HeuristicLab.Clients.Hive.Slave.SlaveCommunicationService">        
+        <endpoint address="net.pipe://localhost/HeuristicLabSlaveCom" binding="netNamedPipeBinding" contract="HeuristicLab.Clients.Hive.Slave.ServiceContracts.ISlaveCommunication"/>
+      </service>
+    </services>
+  </system.serviceModel>
+
+<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
Index: /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Core.cs
===================================================================
--- /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Core.cs	(revision 5157)
+++ /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Core.cs	(revision 5158)
@@ -82,6 +82,4 @@
 
       DeRegisterServiceEvents();
-
-      ClientCom.LogMessage("Program shutdown");
     }
 
