public void MapModelToEntity() { var mapper = new DALEventStatusMapper(); ApiEventStatusServerRequestModel model = new ApiEventStatusServerRequestModel(); model.SetProperties("A"); EventStatus response = mapper.MapModelToEntity(1, model); response.Name.Should().Be("A"); }
public void MapEntityToModel() { var mapper = new DALEventStatusMapper(); EventStatus item = new EventStatus(); item.SetProperties(1, "A"); ApiEventStatusServerResponseModel response = mapper.MapEntityToModel(item); response.Id.Should().Be(1); response.Name.Should().Be("A"); }
public void MapEntityToModelList() { var mapper = new DALEventStatusMapper(); EventStatus item = new EventStatus(); item.SetProperties(1, "A"); List <ApiEventStatusServerResponseModel> response = mapper.MapEntityToModel(new List <EventStatus>() { { item } }); response.Count.Should().Be(1); }