public async void Criminal_File_Search_By_FileNo_ProvincialAndSupreme() { var fcq = new FilesCriminalQuery { SearchMode = SearchMode.FILENO, FileHomeAgencyId = "83.0001", FileNumberTxt = "98050101", CourtLevel = CourtLevelCd2.S }; var fileSearchResponse = await _service.Criminal.SearchAsync(fcq); Assert.Equal("1", fileSearchResponse.RecCount); fcq = new FilesCriminalQuery { SearchMode = SearchMode.FILENO, FileHomeAgencyId = "83.0001", FileNumberTxt = "98050101", CourtLevel = CourtLevelCd2.P }; var fileSearchResponse2 = await _service.Criminal.SearchAsync(fcq); Assert.Equal("2", fileSearchResponse2.RecCount); fcq = new FilesCriminalQuery { SearchMode = SearchMode.FILENO, FileHomeAgencyId = "83.0001", FileNumberTxt = "98050101", CourtLevel = CourtLevelCd2.A }; var fileSearchResponse3 = await _service.Criminal.SearchAsync(fcq); Assert.Equal("0", fileSearchResponse3.RecCount); }
public async void Criminal_File_Search_By_JustinNo() { var fcq = new FilesCriminalQuery { SearchMode = SearchMode.JUSTINNO, FileHomeAgencyId = "83.00001", MdocJustinNoSet = "35674" }; var actionResult = await _service.Criminal.SearchAsync(fcq); Assert.Contains(actionResult.FileDetail, fd => fd.MdocJustinNo == "35674"); }
public async void Criminal_File_Search_By_LastName() { var fcq = new FilesCriminalQuery { SearchMode = SearchMode.PARTNAME, FileHomeAgencyId = "83.0001", LastName = "Sm" }; var actionResult = await _service.Criminal.SearchAsync(fcq); Assert.Contains(actionResult.FileDetail, fd => fd.Participant.Any(p => p.FullNm.Contains("Smith"))); }
public async Task <FileSearchResponse> SearchAsync(FilesCriminalQuery fcq) { fcq.FilePermissions = "[\"A\", \"Y\", \"T\", \"F\", \"C\", \"M\", \"L\", \"R\", \"B\", \"D\", \"E\", \"G\", \"H\", \"N\", \"O\", \"P\", \"S\", \"V\"]"; // for now, use all types - TODO: determine proper list of types? //CourtLevel = "S" Supreme court data, CourtLevel = "P" - Province. return(await _filesClient.FilesCriminalGetAsync(_requestAgencyIdentifierId, _requestPartId, _applicationCode, fcq.SearchMode, fcq.FileHomeAgencyId, fcq.FileNumberTxt, fcq.FilePrefixTxt, fcq.FilePermissions, fcq.FileSuffixNo, fcq.MdocRefTypeCode, fcq.CourtClass, fcq.CourtLevel, fcq.NameSearchTypeCd, fcq.LastName, fcq.OrgName, fcq.GivenName, fcq.Birth?.ToString("yyyy-MM-dd"), fcq.SearchByCrownPartId, fcq.SearchByCrownActiveOnly, fcq.SearchByCrownFileDesignation, fcq.MdocJustinNoSet, fcq.PhysicalFileIdSet)); }
public async void Criminal_File_Search_By_JustinNo() { var fcq = new FilesCriminalQuery { SearchMode = SearchMode.JUSTINNO, FileHomeAgencyId = "83.00001", MdocJustinNoSet = "35674" }; var actionResult = await _controller.FilesCriminalSearchAsync(fcq); var fileSearchResponse = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult); Assert.Contains(fileSearchResponse.FileDetail, fd => fd.MdocJustinNo == "35674"); }
public async void Criminal_File_Search_By_LastName() { var fcq = new FilesCriminalQuery { SearchMode = SearchMode.PARTNAME, FileHomeAgencyId = "83.0001", LastName = "Sm" }; var actionResult = await _controller.FilesCriminalSearchAsync(fcq); var fileSearchResponse = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult); Assert.Contains(fileSearchResponse.FileDetail, fd => fd.Participant.Any(p => p.FullNm.Contains("Smith"))); }
public async void Criminal_File_Search_By_FileNo_ProvincialAndSupreme() { var fcq = new FilesCriminalQuery { SearchMode = SearchMode.FILENO, FileHomeAgencyId = "83.0001", FileNumberTxt = "98050101", }; var actionResult = await _controller.FilesCriminalSearchAsync(fcq); var fileSearchResponse = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult); Assert.Equal("2", fileSearchResponse.RecCount); }
public async Task <ActionResult <FileSearchResponse> > FilesCriminalSearchAsync(FilesCriminalQuery fcq) { var fileSearchResponse = await _criminalFilesService.SearchAsync(fcq); return(Ok(fileSearchResponse)); }