示例#1
0
 public void MissingServiceThrowsException()
 {
     var attribute = new InjectDataAttribute();
     var method = typeof(XunitTestsWithConfigureMethod).GetMethod("MethodWithMissingService");            
     
     Assert.Throws<InvalidOperationException>(() => attribute.GetData(method));
 }
示例#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) }));
        }
示例#3
0
        public void MissingDependencyThrowsException()
        {
            var attribute = new InjectDataAttribute();
            var method    = typeof(XunitTestsWithMissingDependencies).GetMethod("MethodWithMissingDependency");

            Assert.Throws <InvalidOperationException>(() => attribute.GetData(method));
        }
        public void MissingDependencyThrowsException()
        {
            var attribute = new InjectDataAttribute();
            var method = typeof(XunitTestsWithMissingDependencies).GetMethod("MethodWithMissingDependency");

            Assert.Throws<InvalidOperationException>(() => attribute.GetData(method));
        }