Beispiel #1
0
        public void MapEntityToModel()
        {
            var  mapper = new DALUserMapper();
            User item   = new User();

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

            response.Id.Should().Be(1);
            response.Password.Should().Be("A");
            response.Username.Should().Be("A");
        }
Beispiel #2
0
        public void MapEntityToModelList()
        {
            var  mapper = new DALUserMapper();
            User item   = new User();

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

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