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 }
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 }
/// <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>()); }