Exemplo n.º 1
0
        public void MapEntityToModel()
        {
            var          mapper = new DALEventStudentMapper();
            EventStudent item   = new EventStudent();

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

            response.EventId.Should().Be(1);
            response.Id.Should().Be(1);
            response.StudentId.Should().Be(1);
        }
Exemplo n.º 2
0
        public void MapEntityToModelList()
        {
            var          mapper = new DALEventStudentMapper();
            EventStudent item   = new EventStudent();

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

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