示例#1
0
        public static void SetupLoginSuccessfullyWithUsername(string username)
        {
#if FAKE
            var loginProviderBuilder = ScenarioHelper.GetOrCreate(LoginProviderBuilder.CreateBuilder);
            loginProviderBuilder.WithSuccessfulLogin(username);
            ScenarioHelper.Get <IBuilderRegistrationService>().RegisterBuilder(loginProviderBuilder);
#endif

#if REAL
            //put here real Setup
#endif
        }
示例#2
0
        public static void SetupAuthenticatedUserWithUsername(string username)
        {
#if FAKE
            var loginProviderBuilder = ScenarioHelper.GetOrCreate(LoginProviderBuilder.CreateBuilder);
            loginProviderBuilder.WithUser(username, string.Empty);
            ScenarioHelper.Get <IBuilderRegistrationService>().RegisterBuilder(loginProviderBuilder);
#endif

#if REAL
            //put here real Setup
#endif
        }
示例#3
0
 /// <summary>
 /// Resolves steps provider by type.
 /// </summary>
 /// <typeparam name="TStepsProvider">The type of steps provider.</typeparam>
 /// <returns>The steps provider.</returns>
 protected TStepsProvider GetStepsProvider <TStepsProvider>() where TStepsProvider : class, IStepsProvider
 {
     return(ScenarioHelper.Get <TStepsProvider>());
 }