Пример #1
0
        public void MapEntityToModelList()
        {
            var   mapper = new DALAdminMapper();
            Admin item   = new Admin();

            item.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A", "A", "A", "A", 1);
            List <ApiAdminServerResponseModel> response = mapper.MapEntityToModel(new List <Admin>()
            {
                { item }
            });

            response.Count.Should().Be(1);
        }
Пример #2
0
        public void MapEntityToModel()
        {
            var   mapper = new DALAdminMapper();
            Admin item   = new Admin();

            item.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A", "A", "A", "A", 1);
            ApiAdminServerResponseModel response = mapper.MapEntityToModel(item);

            response.Birthday.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            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");
            response.UserId.Should().Be(1);
        }