示例#1
0
文件: Tests.cs 项目: serra/CLAP
        public void Error_Handled_Empty()
        {
            var sample = new Sample_34();

            Expect(sample.Handled, Is.False);

            Expect(() => Parser.Run(new[] {"foo"}, sample), Throws.Exception);

            Expect(sample.Handled, Is.True);
        }
示例#2
0
文件: Tests.cs 项目: kurtaj/CLAP
        public void Error_Handled_Empty()
        {
            var sample = new Sample_34();

            Assert.IsFalse(sample.Handled);

            try
            {
                Parser.Run(new[] { "foo" }, sample);

                Assert.Fail();
            }
            catch
            {
                Assert.IsTrue(sample.Handled);
            }
        }