Exemplo n.º 1
0
 public void SetUp()
 {
     AutoMapperInitializer.Reset();
     AutoMapperInitializer.Initialize();
     _spending           = ObjectMother.GetValidSpending();
     _spendingRegister   = Mapper.Map <SpendingRegisterCommand>(_spending);
     _spendingRemove     = Mapper.Map <SpendingRemoveCommand>(_spending);
     _mockRepository     = new Mock <ISpendingRepository>();
     _employeeRepository = new Mock <IEmployeeRepository>();
     _service            = new SpendingService(_mockRepository.Object, _employeeRepository.Object);
 }
Exemplo n.º 2
0
 public void SetUp()
 {
     AutoMapperInitializer.Reset();
     AutoMapperInitializer.Initialize();
     _client         = ObjectMother.GetClientValid();
     _clientRegister = Mapper.Map <ClientRegisterCommand>(_client);
     _clientUpdate   = Mapper.Map <ClientUpdateCommand>(_client);
     _clientRemove   = Mapper.Map <ClientRemoveCommand>(_client);
     _mockRepository = new Mock <IClientRepository>();
     _service        = new ClientService(_mockRepository.Object);
 }
Exemplo n.º 3
0
 public void SetUp()
 {
     AutoMapperInitializer.Reset();
     AutoMapperInitializer.Initialize();
     _employee         = ObjectMother.GetValidEmployee();
     _employeeRegister = Mapper.Map <EmployeeRegisterCommand>(_employee);
     _employeeUpdate   = Mapper.Map <EmployeeUpdateCommand>(_employee);
     _employeeRemove   = Mapper.Map <EmployeeRemoveCommand>(_employee);
     _mockRepository   = new Mock <IEmployeeRepository>();
     _mockSpendingRepo = new Mock <ISpendingRepository>();
     _service          = new EmployeeService(_mockRepository.Object, _mockSpendingRepo.Object);
 }
Exemplo n.º 4
0
        public void SetUp()
        {
            AutoMapperInitializer.Reset();
            AutoMapperInitializer.Initialize();
            HttpRequestMessage httpRequestMessage = new HttpRequestMessage();

            httpRequestMessage.SetConfiguration(new HttpConfiguration());
            _spendingRegister = new Mock <SpendingRegisterCommand>();
            _spendingRemove   = new Mock <SpendingRemoveCommand>();

            _mockSpendingService    = new Mock <ISpendingService>();
            _mockSpending           = new Mock <Spending>();
            _mockSpendingRepository = new Mock <ISpendingRepository>();
            _spendingsController    = new SpendingsController(_mockSpendingService.Object)
            {
                Request          = httpRequestMessage,
                _spendingService = _mockSpendingService.Object
            };
        }
Exemplo n.º 5
0
        public void SetUp()
        {
            AutoMapperInitializer.Reset();
            AutoMapperInitializer.Initialize();
            HttpRequestMessage httpRequestMessage = new HttpRequestMessage();

            httpRequestMessage.SetConfiguration(new HttpConfiguration());
            _employeeRegister = new Mock <EmployeeRegisterCommand>();
            _employeeRemove   = new Mock <EmployeeRemoveCommand>();
            _employeeUpdate   = new Mock <EmployeeUpdateCommand>();

            _mockEmployeeService    = new Mock <IEmployeeService>();
            _mockEmployee           = new Mock <Employee>();
            _mockEmployeeRepository = new Mock <IEmployeeRepository>();
            _employeesController    = new EmployeesController(_mockEmployeeService.Object)
            {
                Request          = httpRequestMessage,
                _employeeService = _mockEmployeeService.Object
            };
        }
Exemplo n.º 6
0
        public void SetUp()
        {
            AutoMapperInitializer.Reset();
            AutoMapperInitializer.Initialize();
            HttpRequestMessage httpRequestMessage = new HttpRequestMessage();

            httpRequestMessage.SetConfiguration(new HttpConfiguration());
            _clientRegister = new Mock <ClientRegisterCommand>();
            _clientRemove   = new Mock <ClientRemoveCommand>();
            _clientUpdate   = new Mock <ClientUpdateCommand>();
            _clientQuery    = new ClientQuery();

            _mockClientService    = new Mock <IClientService>();
            _mockClient           = new Mock <Client>();
            _mockClientRepository = new Mock <IClientRepository>();
            _clientsController    = new ClientsController(_mockClientService.Object)
            {
                Request        = httpRequestMessage,
                _clientService = _mockClientService.Object
            };
        }
Exemplo n.º 7
0
        public void Initialize()
        {
            AutoMapperInitializer.Reset();
            AutoMapperInitializer.Initialize();
            _accountQuery            = new CheckingAccountQuery();
            _checkingAccountRegister = new Mock <CheckingAccountRegisterCommand>();
            _checkingAccountRemove   = new Mock <CheckingAccountRemoveCommand>();
            _checkingAccountUpdate   = new Mock <CheckingAccountUpdateCommand>();
            HttpRequestMessage request = new HttpRequestMessage();

            request.SetConfiguration(new HttpConfiguration());
            _checkingAccountServiceMock    = new Mock <ICheckingAccountService>();
            _checkingAccountRepositoryMock = new Mock <ICheckingAccountRepository>();
            _clientRepositoryMock          = new Mock <IClientRepository>();
            _checkingAccountsController    = new CheckingAccountsController(_checkingAccountServiceMock.Object)
            {
                Request          = request,
                _accountsService = _checkingAccountServiceMock.Object,
            };
            _checkingAccount           = new Mock <CheckingAccount>();
            _accountTransactionCommand = new Mock <CheckingAccountTransactionCommand>();
        }
Exemplo n.º 8
0
 public void InitializeOnceTime()
 {
     AutoMapperInitializer.Reset();
     AutoMapperInitializer.Initialize();
 }
Exemplo n.º 9
0
 public void OneTimeSetUp()
 {
     AutoMapperInitializer.Reset();
     AutoMapperInitializer.Initialize();
 }