public void CreateHelpers()
 {
     _callRegistration = ObjectFactory.GetInstance<ICallRegistration>();
     _callSearch = ObjectFactory.GetInstance<ICallSearch>();
     _accountingMachine = ObjectFactory.GetInstance<IAccountingMachine>();
     _recordRepository = ObjectFactory.GetInstance<IRecordRepository>();
     _discountRepository = ObjectFactory.GetInstance<IDiscountRepository>();
     _customerRegistration = ObjectFactory.GetInstance<ICustomerRegistration>();
     _subscriptionRegistration = ObjectFactory.GetInstance<ISubscriptionRegistration>();
     _serviceChargeRegistration = ObjectFactory.GetInstance<IServiceChargeRegistration>();
     _serviceChargeSearch = ObjectFactory.GetInstance<IServiceChargeSearch>();
 }
        private static void Initialize()
        {
            ObjectFactory.Initialize(x => x.Scan(scanner =>
                                                     {
                                                         scanner.AssembliesFromApplicationBaseDirectory();
                                                         scanner.LookForRegistries();
                                                     }));

            _callRegistration = ObjectFactory.GetInstance<ICallRegistration>();
            _accountingMachine = ObjectFactory.GetInstance<IAccountingMachine>();
            _discountRepository = ObjectFactory.GetInstance<IDiscountRepository>();
            _customerRegistration = ObjectFactory.GetInstance<ICustomerRegistration>();
            _subscriptionRegistration = ObjectFactory.GetInstance<ISubscriptionRegistration>();
            _subscriptionSearch = ObjectFactory.GetInstance<ISubscriptionSearch>();
            _serviceChargeRegistration = ObjectFactory.GetInstance<IServiceChargeRegistration>();
        }
 public HomeController(ICustomerRegistration customerRegistration,
                       ICustomerRepository customerRepository)
 {
     _customerRegistration = customerRegistration;
     _customerRepository   = customerRepository;
 }
 private void InitMocks()
 {
     _stubbedViewModel                  = Substitute.For <CreateCustomerViewModel>();
     _stubbedCustomerRepository         = Substitute.For <ICustomerRepository>();
     _mockedCustomerRegistrationService = Substitute.For <ICustomerRegistration>();
 }
        public static ISubscription CreateSubscriptionWithDefaultCustomer(ISubscriptionRegistration subscriptionRegistration, ICustomerRegistration customerRegistration, string phoneNumber, string countryIsoCode, CustomerStatus status)
        {
            var customer = customerRegistration.CreateCustomer("John Doe", status);

            return subscriptionRegistration.CreateSubscription(customer,phoneNumber, countryIsoCode);
        }