Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/Mocks/MockServiceLocator.cs @ 5095

Last change on this file since 5095 was 5095, checked in by cneumuel, 14 years ago

#1233

  • fixed config merge process
  • worked on hive server test setup
File size: 1006 bytes
RevLine 
[5095]1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using HeuristicLab.Services.Hive.Tests.Mocks;
6using HeuristicLab.Services.Hive.DataAccess;
7
8namespace HeuristicLab.Services.Hive.Tests {
9  internal class MockServiceLocator : IServiceLocator {
10
11    private IServiceLocator defaultServiceLocator;
12    public MockServiceLocator(IServiceLocator defaultServiceLocator) {
13      this.defaultServiceLocator = defaultServiceLocator;
14    }
15
16    public IAuthorizationManager AuthorizationManager {
17      get { return new MockAuthorizationManager(); }
18    }
19
20    public IHiveDao HiveDao {
21      get { return defaultServiceLocator.HiveDao; }
22    }
23
24    private ILifecycleManager lifecycleManager;
25    public ILifecycleManager LifecycleManager {
26      get {
27        return new MockLifecycleManager();
28      }
29    }
30
31    public TransactionManager TransactionManager {
32      get { return defaultServiceLocator.TransactionManager; }
33    }
34
35  }
36}
Note: See TracBrowser for help on using the repository browser.