public async void Civil_File_Details_By_FileNumberText()
        {
            var actionResult = await _controller.GetCivilFileIdsByAgencyIdCodeAndFileNumberText("83.0001", "44459");

            var fileSearchResponse = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);

            Assert.Contains("3059", fileSearchResponse.First().PhysicalFileId);
        }
        public async void Civil_Appearance_Details_Party_CourtList_AttendanceMethod()
        {
            var actionResult = await _controller.GetCivilAppearanceDetails("100", "19");

            var civilAppearanceDetail = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);

            Assert.Contains(civilAppearanceDetail.Party, p => p.PartyId == "11" && p.AttendanceMethodCd == "TC");
        }
        public async void Criminal_File_Details_By_FileNumberText()
        {
            var actionResult = await _controller.GetCriminalFileIdsByAgencyIdCodeAndFileNumberText("83.0001", "58819-1");

            var fileSearchResponse = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);

            Assert.Contains("3779", fileSearchResponse.First().JustinNo);
        }
        public async void Criminal_File_Details_ByFileNumberText_One()
        {
            var actionResult = await _controller.GetCriminalFileIdsByAgencyIdCodeAndFileNumberText("83.0001", "98050101");

            var fileSearchResponse = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);

            Assert.Single(fileSearchResponse);
        }
        public async void Criminal_File_Details_ByFileNumberText_Multiple()
        {
            var actionResult =
                await _controller.GetCriminalFileIdsByAgencyIdCodeAndFileNumberText("83.0001", "58819");

            var fileSearchResponse = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);

            Assert.Equal(2, fileSearchResponse.Count); // 1 is Provincial
        }
        public async void Criminal_Appearances_by_JustinNo()
        {
            var actionResult = await _controller.GetCriminalFileDetailByFileId("35674");

            var criminalFileAppearancesResponse = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);

            Assert.Contains(criminalFileAppearancesResponse.Appearances.ApprDetail,
                            f => f.LastNm == "Young" && f.GivenNm == "Johnny");
        }
        public async void GetCourtList_Full_3()
        {
            var actionResult = await _controller.GetCourtList("4801", "007", DateTime.Parse("2020-05-06"), null, null);

            var courtListResponse = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);

            Assert.NotNull(courtListResponse.CivilCourtList.First().Document);
            Assert.Equal("PLEADINGS", courtListResponse.CivilCourtList.First().Document.First().Category);
        }
        public async void Civil_Appearances_by_PhysicalFileId()
        {
            var actionResult = await _controller.GetCivilFileDetailByFileId("2506");

            var civilFile = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);

            Assert.Equal("0", civilFile.Appearances.FutureRecCount);
            Assert.Equal("20", civilFile.Appearances.HistoryRecCount);
        }
        public async void Criminal_File_Details_by_JustinNo()
        {
            var actionResult = await _controller.GetCriminalFileDetailByFileId("35674");

            var redactedCriminalFileDetailResponse = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);

            Assert.Equal("35674", redactedCriminalFileDetailResponse.JustinNo);
            Assert.True(redactedCriminalFileDetailResponse.Participant.Count > 0);
        }
        public async void GetCourtList_Empty()
        {
            var actionResult = await _controller.GetCourtList("4801", "101", DateTime.Parse("1999-11-15"), null, null);

            var courtListResponse = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);

            Assert.Equal(0, courtListResponse.CriminalCourtList.Count);
            Assert.Equal(0, courtListResponse.CivilCourtList.Count);
        }
        public async void GetCourtList()
        {
            var actionResult = await _controller.GetCourtList("4801", "101", DateTime.Parse("2016-04-04"), "CR", "4889-1");

            var courtListResponse = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);

            Assert.Equal("4801", courtListResponse.CourtLocationName);
            Assert.Equal("101", courtListResponse.CourtRoomCode);
            Assert.Equal("2016-04-04", courtListResponse.CourtProceedingsDate);
        }
        public async void GetCourtList_Criminal_Video()
        {
            var actionResult = await _controller.GetCourtList("4801", "003", DateTime.Parse("2016-02-01"), null, null);

            var courtListResponse = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);

            var hasVideo = courtListResponse.CriminalCourtList.Any(ccl => ccl.Video);

            Assert.True(hasVideo);
        }
        public async void GetCourtList_Civil_CfcsaFile()
        {
            var actionResult = await _controller.GetCourtList("7999", "001", DateTime.Parse("2003-04-08"), null, null);

            var courtListResponse = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);
            var civilCourtList    = courtListResponse.CivilCourtList.FirstOrDefault(ccl => ccl.CourtListPrintSortNumber == "2");

            Assert.NotNull(civilCourtList);
            Assert.True(civilCourtList.CfcsaFile);
        }
        public async void GetCourtList_Detained()
        {
            var actionResult = await _controller.GetCourtList("7999", "009", DateTime.Parse("1997-02-04"), null, null);

            var courtListResponse = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);
            var criminalCourtList = courtListResponse.CriminalCourtList.FirstOrDefault(ccl => ccl.AppearanceSequenceNumber == "2");

            Assert.NotNull(criminalCourtList);
            Assert.True(criminalCourtList.Detained);
        }
        public async void Criminal_File_Content()
        {
            var actionResult = await _controller.GetCriminalFileContent("4801", "101", DateTime.Parse("2016-04-04"), "44150.0734");

            var criminalFileContent = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);

            Assert.Equal("4801", criminalFileContent.CourtLocaCd);
            Assert.Equal("101", criminalFileContent.CourtRoomCd);
            Assert.Equal("2016-04-04", criminalFileContent.CourtProceedingDate);
        }
        public async void Civil_File_Details_by_PhysicalFileId()
        {
            var actionResult = await _controller.GetCivilFileDetailByFileId("40");

            var redactedCivilFileDetailResponse = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);

            Assert.Equal("40", redactedCivilFileDetailResponse.PhysicalFileId);
            Assert.Equal("P-241", redactedCivilFileDetailResponse.FileNumberTxt);
            Assert.Contains(redactedCivilFileDetailResponse.Party, f => f.LastNm == "Kings");
            Assert.Contains(redactedCivilFileDetailResponse.Party, f => f.LastNm == "Jones");
        }
        public async void GetCourtList_Criminal_And_Civil_Files()
        {
            var actionResult = await _controller.GetCourtList("4801", "101", DateTime.Parse("2015-10-22"), null, "C-996");

            var courtListResponse = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);

            Assert.Equal("4801", courtListResponse.CourtLocationName);
            Assert.Equal("101", courtListResponse.CourtRoomCode);
            Assert.Equal("2015-10-22", courtListResponse.CourtProceedingsDate);
            Assert.Equal("Continuation of a trial or hearing", courtListResponse.CriminalCourtList.First().AppearanceReasonDesc);
        }
        public async void GetCourtList_TrialRemark_Civil()
        {
            var actionResult = await _controller.GetCourtList("4801", "101", DateTime.Parse("2016-05-09"), null, null);

            var courtListResponse = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);

            var civilCourtList = courtListResponse.CivilCourtList.FirstOrDefault(ccl => ccl.CourtListPrintSortNumber == "2");

            Assert.NotNull(civilCourtList);
            Assert.Contains("dd These remarks are going to be very long so I can test the size of this field.", civilCourtList.TrialRemarkTxt);
        }
        public async void GetCourtList_Criminal_Crown()
        {
            var actionResult = await _controller.GetCourtList("4801", "101", DateTime.Parse("2019-11-15"), null, null);

            var courtListResponse = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);

            Assert.Equal("4801", courtListResponse.CourtLocationName);
            Assert.Equal("101", courtListResponse.CourtRoomCode);
            Assert.Equal("2019-11-15", courtListResponse.CourtProceedingsDate);
            Assert.Contains(courtListResponse.CriminalCourtList, f => f.Crown.Count > 0);
        }
        public async void GetCourtList_Full_4()
        {
            var actionResult = await _controller.GetCourtList("4801", "003", DateTime.Parse("2003-10-15"), null, null);

            var courtListResponse    = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);
            var targetCivilCourtList = courtListResponse.CivilCourtList.First();

            Assert.NotNull(targetCivilCourtList);
            Assert.Equal("Kipper has been seized to this case.", targetCivilCourtList.FileCommentText);
            Assert.Equal("These are the sheriff's comments", targetCivilCourtList.SheriffCommentText);
        }
        public async void Civil_Appearance_Details_Party_CourtList_Representative()
        {
            var actionResult = await _controller.GetCivilAppearanceDetails("2307", "9403");

            var civilAppearanceDetail = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);
            var representativeParty   = civilAppearanceDetail.Party.FirstOrDefault(p => p.PartyId == "1112");

            Assert.NotNull(representativeParty);
            Assert.NotEmpty(representativeParty.Representative);
            Assert.Equal("bla", representativeParty.Representative.First().RepFullName);
        }
        public async void Civil_Appearance_Details_Party_PreviousAppearance_PartyAppearanceMethod()
        {
            var actionResult = await _controller.GetCivilAppearanceDetails("100", "19");

            var civilAppearanceDetail = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);
            var party = civilAppearanceDetail.Party.FirstOrDefault(p => p.PartyId == "21");

            Assert.NotNull(party);
            Assert.Equal("P", party.PartyAppearanceMethod);
            Assert.Equal("Present", party.PartyAppearanceMethodDesc); //Doesn't seem to have any appearance methods
        }
        public async void Civil_Appearance_Details_Adjudicator()
        {
            var actionResult = await _controller.GetCivilAppearanceDetails("2255", "13403");

            var civilAppearanceDetail = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);

            Assert.Equal("This is the comment i made to Guy Landry ", civilAppearanceDetail.AdjudicatorComment);
            Assert.Equal("Butler Mon Ami, R", civilAppearanceDetail.Adjudicator.FullName);
            Assert.Equal("In Person", civilAppearanceDetail.Adjudicator.AdjudicatorAppearanceMethodDesc);
            Assert.Equal("IP", civilAppearanceDetail.Adjudicator.AdjudicatorAppearanceMethod);
        }
        public async void Criminal_File_Detail_Document_By_JustinNumber()
        {
            var actionResult = await _controller.GetCriminalFileDetailByFileId(fileId : "35840");

            var criminalFileDocuments = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);

            Assert.Equal(4, criminalFileDocuments.Participant.First().Document.Count);
            Assert.Contains(criminalFileDocuments.Participant.First().Document,
                            doc => doc.DocmFormDsc == "Summons Criminal Code (With a very long name so I can test Cannabis names)");
            Assert.Contains(criminalFileDocuments.Participant.First().Document, doc => doc.PartId == "61145.0002");
        }
Ejemplo n.º 25
0
        public async Task AddLookup()
        {
            var courtRole = new LookupCodeDto
            {
                Type = LookupTypes.CourtRole
            };
            var controllerResult = await _controller.Add(courtRole);

            var response = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(controllerResult);

            Assert.True(response.Id > 0);
        }
        public async void Civil_Appearance_Details_Party_CourtList_LegalRepresentative()
        {
            var actionResult = await _controller.GetCivilAppearanceDetails("1984", "8344");

            var civilAppearanceDetail    = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);
            var legalRepresentativeParty = civilAppearanceDetail.Party.FirstOrDefault(p => p.PartyId == "896");

            Assert.NotNull(legalRepresentativeParty);
            Assert.NotEmpty(legalRepresentativeParty.LegalRepresentative);
            Assert.True(legalRepresentativeParty.LegalRepresentative.First().LegalRepTypeDsc == "Litigation Guardian");
            Assert.True(legalRepresentativeParty.LegalRepresentative.First().LegalRepFullName == "SMITH AND BARNEY ASSOCIATES");
        }
        public async void Civil_File_Content_By_AgencyId_Room_Proceeding_Appearance()
        {
            var actionResult = await _controller.GetCivilFileContent("4801", "101", DateTime.Parse("2016-04-04"), "984");

            var civilFileContent = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);

            Assert.Equal("4801", civilFileContent.CourtLocaCd);
            Assert.Equal("101", civilFileContent.CourtRoomCd);
            Assert.Equal("2016-04-04", civilFileContent.CourtProceedingDate);
            Assert.Equal(1, civilFileContent.CivilFile.Count);
            Assert.Equal("2506", civilFileContent.CivilFile.First().PhysicalFileID);
        }
        public async void Criminal_File_Content_By_JustinNumber()
        {
            var actionResult = await _controller.GetCriminalFileContent(justinNumber : "3179.0000");

            var criminalFileContent = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);

            Assert.Equal("", criminalFileContent.CourtLocaCd);
            Assert.Equal("", criminalFileContent.CourtRoomCd);
            Assert.Equal("", criminalFileContent.CourtProceedingDate);
            Assert.Equal(1, criminalFileContent.AccusedFile.Count);
            Assert.Equal("3179", criminalFileContent.AccusedFile.First().MdocJustinNo);
        }
        public async void Civil_File_Content_By_FileId()
        {
            var actionResult = await _controller.GetCivilFileContent(physicalFileId : "2506");

            var civilFileContent = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);

            Assert.Null(civilFileContent.CourtLocaCd);
            Assert.Null(civilFileContent.CourtRoomCd);
            Assert.Equal("", civilFileContent.CourtProceedingDate);
            Assert.Equal(1, civilFileContent.CivilFile.Count);
            Assert.Equal("2506", civilFileContent.CivilFile.First().PhysicalFileID);
        }
        public async void Civil_Appearance_Details_Party_CourtList_Counsel()
        {
            var actionResult = await _controller.GetCivilAppearanceDetails("2436", "8430");

            var civilAppearanceDetail = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);
            var counselParty          = civilAppearanceDetail.Party.FirstOrDefault(p => p.PartyId == "1928");

            Assert.NotNull(counselParty);
            Assert.NotEmpty(counselParty.Counsel);
            Assert.Equal("119", counselParty.Counsel.First().CounselId);
            Assert.Equal("PETER, John", counselParty.Counsel.First().CounselFullName);
            Assert.Equal("(547)123-1233", counselParty.Counsel.First().PhoneNumber);
        }