Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Tests/Mocks/MockServiceLocator.cs @ 5599

Last change on this file since 5599 was 5599, checked in by ascheibe, 14 years ago

#1233

  • rename 'Slave' namespace to 'SlaveCore' (and assemblies etc) to avoid problems with 'Slave' class
  • use svcutil (OKB-style)
File size: 915 bytes
Line 
1using System;
2using HeuristicLab.Services.Hive;
3
4namespace HeuristicLab.Clients.Hive.Tests {
5  public class MockServiceLocator {
6    private string username;
7    public string Username {
8      get { return username; }
9      set { username = value; }
10    }
11
12    private string password;
13    public string Password {
14      get { return password; }
15      set { password = value; }
16    }
17
18    public HeuristicLab.Services.Hive.Common.ServiceContracts.IHiveService GetService() {
19      HiveService service = new HeuristicLab.Services.Hive.HiveService();
20      return service;
21    }
22
23    public void CallHiveService(Action<HeuristicLab.Services.Hive.Common.ServiceContracts.IHiveService> call) {
24      call(GetService());
25    }
26
27    public T CallHiveService<T>(Func<HeuristicLab.Services.Hive.Common.ServiceContracts.IHiveService, T> call) {
28      return call(GetService());
29    }
30  }
31}
Note: See TracBrowser for help on using the repository browser.