public void MapModelToEntity() { var mapper = new DALUnitMapper(); ApiUnitServerRequestModel model = new ApiUnitServerRequestModel(); model.SetProperties("A"); Unit response = mapper.MapModelToEntity(1, model); response.CallSign.Should().Be("A"); }
public void MapEntityToModel() { var mapper = new DALUnitMapper(); Unit item = new Unit(); item.SetProperties(1, "A"); ApiUnitServerResponseModel response = mapper.MapEntityToModel(item); response.CallSign.Should().Be("A"); response.Id.Should().Be(1); }
public void MapEntityToModelList() { var mapper = new DALUnitMapper(); Unit item = new Unit(); item.SetProperties(1, "A"); List <ApiUnitServerResponseModel> response = mapper.MapEntityToModel(new List <Unit>() { { item } }); response.Count.Should().Be(1); }