Exemplo n.º 1
0
 public SalaryReportControllerTest()
 {
     _provider  = new EmptyModelMetadataProvider();
     _context   = new Context(InMemoryContext.NewContext());
     _mappercfg = new MapperConfiguration(mc =>
     {
         mc.AddProfile(new SalaryReportProfile());
         mc.AddProfile(new EmployeeProfile());
     });
     _mapper    = new Mapper(_mappercfg);
     _employees = new EmployeeRepository(_context, _provider, _mapper);
     InMemoryContext.SeedData(_context);
     _salaryReportRepository = new SalaryReportRepository(_context, _provider, _mapper, _employees);
     _salaryreportController = new SalaryReportController(_context, _salaryReportRepository);
 }
 public SalaryReportController(Context context, ISalaryReportRepository salaryreport)
 {
     _salaryreport = salaryreport;
 }