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);
 }
Beispiel #2
0
        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);
        }