public void BuilderTest_CallContextWithoutSetup_ThrowsException() { // reset context - this is not a good style, yes I know // but test is for ensuring static type behavior FeatureContext.SetInstance(null); Assert.Throws <InvalidOperationException>(() => FeatureContext.IsEnabled <MySampleFeature>()); }