public void ProcedureCodes_GetProcCodesByTreatmentArea_HiddenCategories() { string suffix = MethodBase.GetCurrentMethod().Name; List <ProcedureCode> listMouthProcCodesOld = ProcedureCodes.GetProcCodesByTreatmentArea(false, TreatmentArea.Mouth, TreatmentArea.None); Def defCat = Defs.GetDef(DefCat.ProcCodeCats, listMouthProcCodesOld.FirstOrDefault(x => x.ProcCat > 0 && !Defs.GetHidden(DefCat.ProcCodeCats, x.ProcCat)).ProcCat); defCat.IsHidden = true; Defs.Update(defCat); Defs.RefreshCache(); //ProcedureCodes.RefreshCache(); List <ProcedureCode> listMouthProcCodesNew = ProcedureCodes.GetProcCodesByTreatmentArea(false, TreatmentArea.Mouth, TreatmentArea.None); defCat.IsHidden = false; Defs.Update(defCat); Defs.RefreshCache(); Assert.AreNotEqual(listMouthProcCodesOld.Count, listMouthProcCodesNew.Count); }