What makes MSpec require only static fields? For example, the code here causes an error
public class When_not_enabled
{
private static ActionExecutingContext filterContext;
// On purpose I've made subject non static
private CompleteOrderGuardFilter subject;
Establish context = () =>
{
// Here I get cannot access non static field in static context
subject = new CompleteOrderGuardFilter(null, false);
filterContext = new ActionExecutingContext();
};
}
Error:
cannot access non static field in static context