public void MapModelToBO() { var mapper = new BOLPostTypeMapper(); ApiPostTypeRequestModel model = new ApiPostTypeRequestModel(); model.SetProperties("A"); BOPostType response = mapper.MapModelToBO(1, model); response.Type.Should().Be("A"); }
public void MapBOToModel() { var mapper = new BOLPostTypeMapper(); BOPostType bo = new BOPostType(); bo.SetProperties(1, "A"); ApiPostTypeResponseModel response = mapper.MapBOToModel(bo); response.Id.Should().Be(1); response.Type.Should().Be("A"); }
public void MapEFToBO() { var mapper = new DALPostTypeMapper(); PostType entity = new PostType(); entity.SetProperties(1, "A"); BOPostType response = mapper.MapEFToBO(entity); response.Id.Should().Be(1); response.Type.Should().Be("A"); }
public void MapBOToEF() { var mapper = new DALPostTypeMapper(); var bo = new BOPostType(); bo.SetProperties(1, "A"); PostType response = mapper.MapBOToEF(bo); response.Id.Should().Be(1); response.Type.Should().Be("A"); }
public void MapBOToModelList() { var mapper = new BOLPostTypeMapper(); BOPostType bo = new BOPostType(); bo.SetProperties(1, "A"); List <ApiPostTypeResponseModel> response = mapper.MapBOToModel(new List <BOPostType>() { { bo } }); response.Count.Should().Be(1); }