Пример #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));
        }
Пример #4
0
        public void MissingDependencyThrowsException()
        {
            var attribute = new InjectDataAttribute();
            var method = typeof(XunitTestsWithMissingDependencies).GetMethod("MethodWithMissingDependency");

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