public void MapBOToModelList() { var mapper = new BOLWorkerPoolMapper(); BOWorkerPool bo = new BOWorkerPool(); bo.SetProperties("A", true, "A", "A", 1); List <ApiWorkerPoolResponseModel> response = mapper.MapBOToModel(new List <BOWorkerPool>() { { bo } }); response.Count.Should().Be(1); }
public void MapModelToBO() { var mapper = new BOLWorkerPoolMapper(); ApiWorkerPoolRequestModel model = new ApiWorkerPoolRequestModel(); model.SetProperties(true, "A", "A", 1); BOWorkerPool response = mapper.MapModelToBO("A", model); response.IsDefault.Should().Be(true); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); response.SortOrder.Should().Be(1); }
public void MapBOToModel() { var mapper = new BOLWorkerPoolMapper(); BOWorkerPool bo = new BOWorkerPool(); bo.SetProperties("A", true, "A", "A", 1); ApiWorkerPoolResponseModel response = mapper.MapBOToModel(bo); response.Id.Should().Be("A"); response.IsDefault.Should().Be(true); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); response.SortOrder.Should().Be(1); }
public void MapEFToBO() { var mapper = new DALWorkerPoolMapper(); WorkerPool entity = new WorkerPool(); entity.SetProperties("A", true, "A", "A", 1); BOWorkerPool response = mapper.MapEFToBO(entity); response.Id.Should().Be("A"); response.IsDefault.Should().Be(true); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); response.SortOrder.Should().Be(1); }
public void MapBOToEF() { var mapper = new DALWorkerPoolMapper(); var bo = new BOWorkerPool(); bo.SetProperties("A", true, "A", "A", 1); WorkerPool response = mapper.MapBOToEF(bo); response.Id.Should().Be("A"); response.IsDefault.Should().Be(true); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); response.SortOrder.Should().Be(1); }