public void MapModelToBO() { var mapper = new BOLSchemaBPersonMapper(); ApiSchemaBPersonRequestModel model = new ApiSchemaBPersonRequestModel(); model.SetProperties("A"); BOSchemaBPerson response = mapper.MapModelToBO(1, model); response.Name.Should().Be("A"); }
public void MapBOToModel() { var mapper = new BOLSchemaBPersonMapper(); BOSchemaBPerson bo = new BOSchemaBPerson(); bo.SetProperties(1, "A"); ApiSchemaBPersonResponseModel response = mapper.MapBOToModel(bo); response.Id.Should().Be(1); response.Name.Should().Be("A"); }
public void MapEFToBO() { var mapper = new DALSchemaBPersonMapper(); SchemaBPerson entity = new SchemaBPerson(); entity.SetProperties(1, "A"); BOSchemaBPerson response = mapper.MapEFToBO(entity); response.Id.Should().Be(1); response.Name.Should().Be("A"); }
public void MapBOToEF() { var mapper = new DALSchemaBPersonMapper(); var bo = new BOSchemaBPerson(); bo.SetProperties(1, "A"); SchemaBPerson response = mapper.MapBOToEF(bo); response.Id.Should().Be(1); response.Name.Should().Be("A"); }
public void MapBOToModelList() { var mapper = new BOLSchemaBPersonMapper(); BOSchemaBPerson bo = new BOSchemaBPerson(); bo.SetProperties(1, "A"); List <ApiSchemaBPersonResponseModel> response = mapper.MapBOToModel(new List <BOSchemaBPerson>() { { bo } }); response.Count.Should().Be(1); }