Exemple #1
0
 public static void BeforeDeliveryAddressScenarios()
 {
     var addressRepository = new AddressRepository();
     var logger = new FakeLogger();
     var addressService = new DeliveryAddressService(addressRepository, logger);
     ScenarioContext.Current.Set(addressService);
 }
Exemple #2
0
        public static void BeforeMembershipScenarios()
        {
            var context = new ShopAnyWareSql();
            var userRepository = new UserRepository(context);
            var roleRepository = new RoleRepository(context);
            var profileRepository = new ProfileRepository(context);
            var membershipRepository = new MembershipRepository();

            var logger = new FakeLogger();
            var emailService = new FakeEmailService();
            ScenarioContext.Current.Set(emailService);

            var membershipService = new MembershipService(logger, emailService, userRepository, roleRepository, profileRepository, membershipRepository);
            ScenarioContext.Current.Set(membershipService);
        }
Exemple #3
0
 public static void BeforeItemsScenarios()
 {
     var itemsRepository = new ItemsRepository();
     var packageRepository = new PackageRepository();
     var logger = new FakeLogger();
     var itemsService = new ItemsService(itemsRepository, packageRepository, logger);
     ScenarioContext.Current.Set(itemsService);
 }
Exemple #4
0
 public static void BeforeExpressCheckoutScenarios()
 {
     var context = new ShopAnyWareSql();
     var userRepository = new UserRepository(context);
     var roleRepository = new RoleRepository(context);
     var profileRepository = new ProfileRepository(context);
     var membershipRepository = new MembershipRepository();
     var transactionRepo = new TransactionsRepository();
     var emailSvc = new FakeEmailService();
     var logger = new FakeLogger();
     var emailService = new FakeEmailService();
     var transactionService = new TransactionService(transactionRepo, emailSvc, logger);
     ScenarioContext.Current.Set(transactionService);
     var membershipService = new MembershipService(logger, emailService, userRepository, roleRepository, profileRepository, membershipRepository);
     ScenarioContext.Current.Set(membershipService);
 }
Exemple #5
0
 public static void BeforePackagesScenarios()
 {
     var context = new ShopAnyWareSql();
     var userRepository = new UserRepository(context);
     var packageRepository = new PackageRepository();
     var itemsRepository = new ItemsRepository();
     var addressRepository = new AddressRepository();
     var logger = new FakeLogger();
     var emailSvc = new FakeEmailService();
     var packagesService = new PackagesService(
         packageRepository, userRepository, addressRepository, emailSvc, logger);
     var itemsService = new ItemsService(itemsRepository, packageRepository, logger);
     ScenarioContext.Current.Set(packagesService);
     ScenarioContext.Current.Set(itemsService);
 }
Exemple #6
0
 public static void BeforeOrderScenarios()
 {
     var orderRepository = new OrderRepository();
     var logger = new FakeLogger();
     var orderService = new OrderService(orderRepository, new FakeEmailService(), logger);
     ScenarioContext.Current.Set(orderService);
 }