Spoiler
Dim PID As Integer = TestUtils.GetPID(MERGE_A_Forename, MERGE_A_Surname, MERGE_A_DOB) Assert.Greater(PID, 0, "P ID not returned from saved p as expected") Dim mergeHlpr As New MergeTestHelper Dim reportHlpr As New ResultTestsHelper _service.UserCredentials.Token = _token Dim findResultInfo As FindResultCriteria = New FindResultCriteria findResultInfo.PID = Convert.ToString(PID) Dim findInfo As FindMerge = mergeHlpr.BuildMergeCriteria() findInfo.PrimaryPId = PID.ToString Dim reply As FindMergeResponse = _service.FindMerge(findInfo) For Each mergeItem As FindMergeItem In reply.P Dim Detail As GetP = mergeHlpr.BuildGetCriteria() Detail.PID = mergeItem.PrimaryID Next Dim serviceObj As New ServicesPort Dim findResp As FindResultResponse = _service.FindResult(findResultInfo) reportHlpr.GetResultForReportID(CStr(Merge_A_TestReportID), _token, serviceObj)
So I run the above test and I get the most annoying error message ever; "Object reference not set to an instance of an object".
I've had to deal with this before and usually have after sometime, but now I'm looking at a brickwall as everything there is doing something, as far as I can tell and brings back the results I need.
Any suggestions on how to fix this test?
- Fixed it, for anyone that's remotely interested it was the last line;
"reportHlpr.GetResultForReportID(CStr(Merge_A_TestReportID), _token, serviceObj)"
That was the problem
