public override MethodResult Execute(object testClass) { var result = theory.Execute(testClass); InjectDataAttribute.Release(testClass.GetType()); return(result); }
public void MissingServiceThrowsException() { var attribute = new InjectDataAttribute(); var method = typeof(XunitTestsWithConfigureMethod).GetMethod("MethodWithMissingService"); Assert.Throws<InvalidOperationException>(() => attribute.GetData(method, new Type[] { typeof(int) })); }