public void MapModelToEntity() { var mapper = new DALTicketMapper(); ApiTicketServerRequestModel model = new ApiTicketServerRequestModel(); model.SetProperties("A", 1); Ticket response = mapper.MapModelToEntity(1, model); response.PublicId.Should().Be("A"); response.TicketStatusId.Should().Be(1); }
public void MapEntityToModel() { var mapper = new DALTicketMapper(); Ticket item = new Ticket(); item.SetProperties(1, "A", 1); ApiTicketServerResponseModel response = mapper.MapEntityToModel(item); response.Id.Should().Be(1); response.PublicId.Should().Be("A"); response.TicketStatusId.Should().Be(1); }
public void MapEntityToModelList() { var mapper = new DALTicketMapper(); Ticket item = new Ticket(); item.SetProperties(1, "A", 1); List <ApiTicketServerResponseModel> response = mapper.MapEntityToModel(new List <Ticket>() { { item } }); response.Count.Should().Be(1); }