public void MapModelToBO() { var mapper = new BOLTableMapper(); ApiTableRequestModel model = new ApiTableRequestModel(); model.SetProperties("A"); BOTable response = mapper.MapModelToBO(1, model); response.Name.Should().Be("A"); }
public void MapBOToModel() { var mapper = new BOLTableMapper(); BOTable bo = new BOTable(); bo.SetProperties(1, "A"); ApiTableResponseModel response = mapper.MapBOToModel(bo); response.Id.Should().Be(1); response.Name.Should().Be("A"); }
public void MapEFToBO() { var mapper = new DALTableMapper(); Table entity = new Table(); entity.SetProperties(1, "A"); BOTable response = mapper.MapEFToBO(entity); response.Id.Should().Be(1); response.Name.Should().Be("A"); }
public void MapBOToEF() { var mapper = new DALTableMapper(); var bo = new BOTable(); bo.SetProperties(1, "A"); Table response = mapper.MapBOToEF(bo); response.Id.Should().Be(1); response.Name.Should().Be("A"); }
public void MapBOToModelList() { var mapper = new BOLTableMapper(); BOTable bo = new BOTable(); bo.SetProperties(1, "A"); List <ApiTableResponseModel> response = mapper.MapBOToModel(new List <BOTable>() { { bo } }); response.Count.Should().Be(1); }