public ActionResult <IEnumerable <ConstructionSubtypeResponse> > GetAllByTypeId(
            int typeId)
        {
            var constructionSubtype = _service.GetAllByTypeId(typeId);

            return(Ok(_mapper.Map <IEnumerable <ConstructionSubtypeResponse> >(
                          constructionSubtype)));
        }
        public void GetAllByTypeId_ShouldReturnConstructionSubtypes()
        {
            // Arrange
            int typeId = _rnd.Next(1, TestData.constructionTypes.Count());

            // Act
            var returnedConstructionSubtypes = _service.GetAllByTypeId(typeId);

            // Assert
            Assert.Equal(TestData.constructionSubtypes.Where(v => v.Type.Id == typeId),
                         returnedConstructionSubtypes);
        }