private static void SetupMockAuthenticatedUserContext(ContainerBuilder builder) { var authenticatedUserContext = Substitute.For<IAuthenticatedUserContext>(); builder.RegisterInstance(authenticatedUserContext).As<IAuthenticatedUserContext>(); var mockAuthenticatedUserContext = new MockAuthenticatedUserContext(authenticatedUserContext); ScenarioContext.Current.Set(mockAuthenticatedUserContext); }
private static void SetupMockAuthenticatedUserContext(ContainerBuilder builder) { var authenticatedUserContext = Substitute.For <IAuthenticatedUserContext>(); builder.RegisterInstance(authenticatedUserContext).As <IAuthenticatedUserContext>(); var mockAuthenticatedUserContext = new MockAuthenticatedUserContext(authenticatedUserContext); ScenarioContext.Current.Set(mockAuthenticatedUserContext); }