Пример #1
0
        public void MapModelToEntity()
        {
            var mapper = new DALOfficerCapabilitiesMapper();
            ApiOfficerCapabilitiesServerRequestModel model = new ApiOfficerCapabilitiesServerRequestModel();

            model.SetProperties(1, 1);
            OfficerCapabilities response = mapper.MapModelToEntity(1, model);

            response.CapabilityId.Should().Be(1);
            response.OfficerId.Should().Be(1);
        }
Пример #2
0
        public void MapEntityToModel()
        {
            var mapper = new DALOfficerCapabilitiesMapper();
            OfficerCapabilities item = new OfficerCapabilities();

            item.SetProperties(1, 1, 1);
            ApiOfficerCapabilitiesServerResponseModel response = mapper.MapEntityToModel(item);

            response.CapabilityId.Should().Be(1);
            response.Id.Should().Be(1);
            response.OfficerId.Should().Be(1);
        }
Пример #3
0
        public void MapEntityToModelList()
        {
            var mapper = new DALOfficerCapabilitiesMapper();
            OfficerCapabilities item = new OfficerCapabilities();

            item.SetProperties(1, 1, 1);
            List <ApiOfficerCapabilitiesServerResponseModel> response = mapper.MapEntityToModel(new List <OfficerCapabilities>()
            {
                { item }
            });

            response.Count.Should().Be(1);
        }