Пример #1
0
 public UnitTestCoreSession(
     string cityId,
     ICoreSessionContainer <Guid?, string> company,
     ICoreSessionContainer <string, string> user,
     ISessionOrganization organization             = default,
     ICoreSessionContainer <string, string> broker = default)
 {
     City         = CoreSessionContainer.Create(cityId);
     Company      = company;
     User         = user ?? CoreSessionContainer.Create(default(string), default(string));
     Organization = organization ?? new SessionOrganization();
     Broker       = broker;
 }
Пример #2
0
 public IDisposable Use(
     string cityId,
     Guid?companyId,
     string companyName,
     Guid?groupId,
     string groupName,
     string brokerId,
     string brokerName)
 {
     lock (this)
     {
         var currentSession = Session;
         var newSession     = new UnitTestCoreSession(cityId,
                                                      CoreSessionContainer.Create(companyId, companyName),
                                                      _currentUser,
                                                      new SessionOrganization(