Ejemplo n.º 1
0
        public void MapEntityToModelList()
        {
            var     mapper = new DALOfficerMapper();
            Officer item   = new Officer();

            item.SetProperties(1, "A", "A", "A", "A", "A");
            List <ApiOfficerServerResponseModel> response = mapper.MapEntityToModel(new List <Officer>()
            {
                { item }
            });

            response.Count.Should().Be(1);
        }
Ejemplo n.º 2
0
        public void MapModelToEntity()
        {
            var mapper = new DALOfficerMapper();
            ApiOfficerServerRequestModel model = new ApiOfficerServerRequestModel();

            model.SetProperties("A", "A", "A", "A", "A");
            Officer response = mapper.MapModelToEntity(1, model);

            response.Badge.Should().Be("A");
            response.Email.Should().Be("A");
            response.FirstName.Should().Be("A");
            response.LastName.Should().Be("A");
            response.Password.Should().Be("A");
        }
Ejemplo n.º 3
0
        public void MapEntityToModel()
        {
            var     mapper = new DALOfficerMapper();
            Officer item   = new Officer();

            item.SetProperties(1, "A", "A", "A", "A", "A");
            ApiOfficerServerResponseModel response = mapper.MapEntityToModel(item);

            response.Badge.Should().Be("A");
            response.Email.Should().Be("A");
            response.FirstName.Should().Be("A");
            response.Id.Should().Be(1);
            response.LastName.Should().Be("A");
            response.Password.Should().Be("A");
        }