コード例 #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
ファイル: StepsBase.cs プロジェクト: LogoFX/Samples.WinRT
 /// <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>());
 }