Exemplo n.º 1
0
        public void MapEntityToModelList()
        {
            var      mapper = new DALCustomerMapper();
            Customer item   = new Customer();

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

            response.Count.Should().Be(1);
        }
Exemplo n.º 2
0
        public void MapEntityToModel()
        {
            var      mapper = new DALCustomerMapper();
            Customer item   = new Customer();

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

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