Last change
on this file since 5615 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 | |
---|
1 | using System;
|
---|
2 | using HeuristicLab.Services.Hive;
|
---|
3 |
|
---|
4 | namespace 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.