예제 #1
0
        public void Fees_FillCache()
        {
            FeeTestArgs args = CreateManyFees(1, 1, 1, MethodBase.GetCurrentMethod().Name);

            Clinics.ClinicNum = args.ListClinics.First().ClinicNum;
            List <Fee> listExpectedFees = args.ListFees.OrderBy(x => x.FeeNum).ToList();

            Fees.FillCache();
            FeeCache cacheCopy = Fees.GetCache();
            //It is possible another test created a fee with a different fee schednum and clinicNum=0. The fee cache *should* load these if they exist
            //but for the purpose of the test it is simpler to just exclude them here.
            List <Fee> listCachedFees = cacheCopy.Where(x => !(x.ClinicNum == 0 && x.FeeSched != _standardFeeSchedNum)).OrderBy(x => x.FeeNum).ToList();

            Assert.IsTrue(AreListsSimilar(listExpectedFees, listCachedFees));
        }
예제 #2
0
 public static void RefreshCache()
 {
     Fees.FillCache();
 }