Ejemplo n.º 1
0
        public void MapModelToEntity()
        {
            var mapper = new DALUnitOfficerMapper();
            ApiUnitOfficerServerRequestModel model = new ApiUnitOfficerServerRequestModel();

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

            response.OfficerId.Should().Be(1);
            response.UnitId.Should().Be(1);
        }
Ejemplo n.º 2
0
        public void MapEntityToModel()
        {
            var         mapper = new DALUnitOfficerMapper();
            UnitOfficer item   = new UnitOfficer();

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

            response.Id.Should().Be(1);
            response.OfficerId.Should().Be(1);
            response.UnitId.Should().Be(1);
        }
Ejemplo n.º 3
0
        public void MapEntityToModelList()
        {
            var         mapper = new DALUnitOfficerMapper();
            UnitOfficer item   = new UnitOfficer();

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

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