Esempio n. 1
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
        }
Esempio n. 2
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
        }
Esempio n. 3
0
 // ReSharper disable once RedundantOverridenMember
 protected override void RegisterFakes()
 {
     base.RegisterFakes();
     RegistrationHelper.RegisterBuilder(ScenarioHelper.Registrator, ScenarioHelper.GetOrCreate(WarehouseProviderBuilder.CreateBuilder));
 }