public void MapModelToBO() { var mapper = new BOLKeyAllocationMapper(); ApiKeyAllocationRequestModel model = new ApiKeyAllocationRequestModel(); model.SetProperties(1); BOKeyAllocation response = mapper.MapModelToBO("A", model); response.Allocated.Should().Be(1); }
public void MapBOToModel() { var mapper = new BOLKeyAllocationMapper(); BOKeyAllocation bo = new BOKeyAllocation(); bo.SetProperties("A", 1); ApiKeyAllocationResponseModel response = mapper.MapBOToModel(bo); response.Allocated.Should().Be(1); response.CollectionName.Should().Be("A"); }
public void MapBOToModelList() { var mapper = new BOLKeyAllocationMapper(); BOKeyAllocation bo = new BOKeyAllocation(); bo.SetProperties("A", 1); List <ApiKeyAllocationResponseModel> response = mapper.MapBOToModel(new List <BOKeyAllocation>() { { bo } }); response.Count.Should().Be(1); }