public ConstructionSubtypesController(
     IConstructionSubtypeService constructionSubtypeService,
     IMapper mapper)
 {
     _service = constructionSubtypeService;
     _mapper  = mapper;
 }
        public ConstructionSubtypeServiceTest()
        {
            // Arrange
            var repository = new Mock <IConstructionSubtypeRepo>();

            foreach (var type in TestData.constructionTypes)
            {
                repository.Setup(mock =>
                                 mock.GetAllByTypeId(type.Id)).Returns(
                    TestData.constructionSubtypes.Where(v => v.Type.Id == type.Id));
            }

            _service = new ConstructionSubtypeService(repository.Object);
        }