public void MapModelToBO() { var mapper = new BOLLinkTypeMapper(); ApiLinkTypeRequestModel model = new ApiLinkTypeRequestModel(); model.SetProperties("A"); BOLinkType response = mapper.MapModelToBO(1, model); response.Type.Should().Be("A"); }
public void MapBOToModel() { var mapper = new BOLLinkTypeMapper(); BOLinkType bo = new BOLinkType(); bo.SetProperties(1, "A"); ApiLinkTypeResponseModel response = mapper.MapBOToModel(bo); response.Id.Should().Be(1); response.Type.Should().Be("A"); }
public void MapEFToBO() { var mapper = new DALLinkTypeMapper(); LinkType entity = new LinkType(); entity.SetProperties(1, "A"); BOLinkType response = mapper.MapEFToBO(entity); response.Id.Should().Be(1); response.Type.Should().Be("A"); }
public void MapBOToEF() { var mapper = new DALLinkTypeMapper(); var bo = new BOLinkType(); bo.SetProperties(1, "A"); LinkType response = mapper.MapBOToEF(bo); response.Id.Should().Be(1); response.Type.Should().Be("A"); }
public void MapBOToModelList() { var mapper = new BOLLinkTypeMapper(); BOLinkType bo = new BOLinkType(); bo.SetProperties(1, "A"); List <ApiLinkTypeResponseModel> response = mapper.MapBOToModel(new List <BOLinkType>() { { bo } }); response.Count.Should().Be(1); }