I am writing a test class for a trigger (after update in this case), and while the code works on my person account record page when I inline edit, it does not work in my test class when I manually change the field that would re-evaluate the formula to true/false. The problem it seems is that the formula field does not get evaulated in Trigger.New while I'm executing the test class. here's where the code breaks:
Trigger code - this is where I get different results in inline vs. test class change. Enrolled_Within_Past_Year__pc is the formula field:
if(triggerNew.get(i).Enrolled_Within_Past_Year__pc != triggerOld.get(i).Enrolled_Within_Past_Year__pc){
....
}