Example #1
0
        public void Children_empty_implies_log_messages()
        {
            var tt      = new ReflectedTheory(GetType().GetMethod("PNoDataAttributesTheory"));
            var runner  = new FakeRunner();
            var context = SelfTestUtility.NewTestContext(tt, runner);

            tt.BeforeExecutingSafe(context);

            var evt = runner.Logger.Events;

            Assert.Equal("No test data for theory", ((TestMessageEventArgs)evt[0]).Message);
        }
Example #2
0
        public void Children_empty_implies_theory_is_failed()
        {
            Assert.UseStrictMode = true;
            try {
                var tt      = new ReflectedTheory(GetType().GetMethod("PNoDataAttributesTheory"));
                var runner  = new FakeRunner();
                var context = SelfTestUtility.NewTestContext(tt, runner);
                tt.BeforeExecutingSafe(context);

                Assert.True(tt.Failed);
                Assert.Equal("No test data for theory", tt.Reason);
            } finally {
                Assert.UseStrictMode = false;
            }
        }