Пример #1
0
        public HomeControllerTest()
        {
            var contactprofile = new ContactProfile();

            _repository = new MockContactsRepo();
            var mapperConfiguration = new MapperConfiguration(cfg => { cfg.AddProfile(contactprofile); });

            _mapper = mapperConfiguration.CreateMapper();
            var random = new Random();

            _controller = new HomeController(_repository, _mapper);
        }
 public ContactsController(IContactsRepo contactsRepo)
 {
     _contactsRepo = contactsRepo;
 }
 public ContactsController(IContactsRepo repo)
 {
     _repo = repo;
 }
Пример #4
0
 public ContactsService(IContactsRepo contactsRepo, IContactsMapper contactsMapper)
 {
     _contactsRepo   = contactsRepo;
     _contactsMapper = contactsMapper;
 }
Пример #5
0
 public HomeController(IContactsRepo repository, IMapper mapper)
 {
     _repository = repository;
     _mapper     = mapper;
 }
Пример #6
0
 public HomeController(IContactsRepo contactsRepo)
 {
     _contacts = contactsRepo;
 }
 public ContactControllerTest()
 {
     _repo       = new ContactRepoFake();
     _controller = new ContactsController(_repo);
 }