public void SetUp() { _userService = new Mock<IUserService>(MockBehavior.Strict); _action = new Mock<Func<bool>>(MockBehavior.Strict); _fixture = new UserImpersonationService(_userService.Object); }
public void SetUp() { _userService = new Mock <IUserRepository>(MockBehavior.Strict); _action = new Mock <Func <bool> >(MockBehavior.Strict); _fixture = new UserImpersonationService(_userService.Object); }
public void when_impersonating_should_return_impersonated_user() { setActiveStatus("hank", true); UserImpersonationService.createImpersonationFor("annie", "hank"); _cut.GetImpersonatedLoginFor("annie").ShouldEqual("hank"); }
public void BeforeAll() { _container = bootstrap_ioc.getContainer(c => { }); _cut = _container.GetInstance <UserImpersonationService>(); _settings = _container.GetInstance <DovetailDatabaseSettings>(); _settings.IsImpersonationEnabled = true; beforeAll(); }
public void when_not_impersonating_should_return_null() { UserImpersonationService.cancelImpersonationFor("annie"); _cut.GetImpersonatedLoginFor("annie").ShouldBeNull(); }
public void beforeEach() { UserImpersonationService.cancelImpersonationFor("annie"); setAllowProxy("hank", true); setActiveStatus("hank", true); }
public void beforeEach() { setActiveStatus("hank", true); UserImpersonationService.createImpersonationFor("annie", "hank"); }