public async void Criminal_File_Details_by_JustinNo_Test()
        {
            var actionResult = await _controller.GetCriminalFileDetailByFileId("4074");

            var redactedCriminalFileDetailResponse = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);

            Assert.Equal("4074", redactedCriminalFileDetailResponse.JustinNo);
            Assert.True(redactedCriminalFileDetailResponse.Participant.Count > 0);
        }
Exemplo n.º 2
0
        public async void Criminal_Appearance_Details_CacheTest()
        {
            //This fetches the FileDetail plus the appearances. So these should be cached after this call.
            var actionResult = await _controller.GetCriminalFileDetailByFileId("2934");

            var fileDetail = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult);

            //Now call criminalAppearanceDetails.
            var actionResult2 = await _controller.GetCriminalAppearanceDetails("2934", "36548.0734", "19498.0042");

            var criminalAppearanceDetail = HttpResponseTest.CheckForValidHttpResponseAndReturnValue(actionResult2);

            Assert.Equal(1, criminalAppearanceDetail.Charges.Count);
            Assert.Equal("2934", criminalAppearanceDetail.JustinNo);
            Assert.Contains(criminalAppearanceDetail.Charges, p => p.AppearanceReasonDsc == "First Appearance");
            Assert.Contains(criminalAppearanceDetail.Charges, p => p.StatuteDsc == "offer bribe to justice/pol comm/peac off");
            Assert.Contains(criminalAppearanceDetail.Charges, p => p.StatuteSectionDsc == "CCC - 120(b)");
            Assert.Equal(1, criminalAppearanceDetail.AppearanceMethods.Count);
            Assert.Equal("TC", criminalAppearanceDetail.AppearanceMethods.First().AppearanceMethodCd);
        }