- Timestamp:
- 06/20/11 17:04:35 (14 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/Mocks
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/Mocks/MockAuthorizationManager.cs
r6372 r6457 24 24 namespace HeuristicLab.Services.Hive.Tests.Mocks { 25 25 public class MockAuthorizationManager : IAuthorizationManager { 26 private Guid userId = new Guid("6C7911A1-46EA-4E51-97DF-5582653AAFCE"); 26 public static Guid MockUserId1 = new Guid("6C7911A1-46EA-4E51-97DF-5582653AAFCE"); 27 public static Guid MockUserId2 = new Guid("897660EB-C90F-4054-988C-D39D530A0A02"); 28 public static Guid MockUserId3 = new Guid("9F7B4EA8-A38D-4BC2-802F-E148AC7A6A87"); 29 30 private Guid userId = MockUserId1; 27 31 28 32 public Guid UserId { … … 37 41 // o.k. 38 42 } 39 43 44 internal void SetUserId(Guid id) { 45 this.userId = id; 46 } 40 47 } 41 48 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/Mocks/MockServiceLocator.cs
r6452 r6457 22 22 using HeuristicLab.Services.Hive.DataAccess; 23 23 using HeuristicLab.Services.Hive.Tests.Mocks; 24 using System; 24 25 25 26 namespace HeuristicLab.Services.Hive.Tests { … … 35 36 } 36 37 38 private MockAuthorizationManager mockAuthorizationManager = new MockAuthorizationManager(); 37 39 public IAuthorizationManager AuthorizationManager { 38 get { return new MockAuthorizationManager(); }40 get { return mockAuthorizationManager; } 39 41 } 40 42 … … 53 55 get { return defaultServiceLocator.HeartbeatManager; } 54 56 } 57 58 #region Special mocking methods 59 public void SetCurrentUser(Guid id) { 60 mockAuthorizationManager.SetUserId(id); 61 } 62 63 #endregion 55 64 } 56 65 }
Note: See TracChangeset
for help on using the changeset viewer.