Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/21/11 17:35:42 (13 years ago)
Author:
cneumuel
Message:

#1233

  • fixed handling of StateLog in DataLayer
  • extended unit tests
  • changed style of service calls to OKB-like style (using delegates)
  • added possibility that parent jobs can be finished immediately when child jobs are finished
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Tests/Mocks/MockServiceLocator.cs

    r5405 r5526  
    11using System;
    2 using System.Collections.Generic;
    3 using System.Linq;
    4 using System.Text;
    5 using HeuristicLab.Clients.Common;
     2using HeuristicLab.Services.Hive;
    63using HeuristicLab.Services.Hive.Common.ServiceContracts;
    7 using HeuristicLab.Services.Hive;
    84
    95namespace HeuristicLab.Clients.Hive.Tests {
    106  public class MockServiceLocator : IServiceLocator {
    11     public Disposable<IHiveService> GetService() {
    12       return new Disposable<IHiveService>(new HiveService());
     7    private string username;
     8    public string Username {
     9      get { return username; }
     10      set { username = value; }
    1311    }
    1412
    15     public Disposable<IHiveService> GetService(string username, string password) {
    16       return GetService();
     13    private string password;
     14    public string Password {
     15      get { return password; }
     16      set { password = value; }
     17    }
     18
     19    public IHiveService GetService() {
     20      return new HiveService();
     21    }
     22
     23    public void CallHiveService(Action<IHiveService> call) {
     24      call(GetService());
     25    }
     26
     27    public T CallHiveService<T>(Func<IHiveService, T> call) {
     28      return call(GetService());
    1729    }
    1830  }
Note: See TracChangeset for help on using the changeset viewer.