public override MethodResult Execute(object testClass)
            {
                var result = theory.Execute(testClass);

                InjectDataAttribute.Release(testClass.GetType());
                return(result);
            }
Exemplo n.º 2
0
 public void MissingServiceThrowsException()
 {
     var attribute = new InjectDataAttribute();
     var method = typeof(XunitTestsWithConfigureMethod).GetMethod("MethodWithMissingService");
     Assert.Throws<InvalidOperationException>(() => attribute.GetData(method, new Type[] { typeof(int) }));
 }