コード例 #1
0
        public void RobinsonvCalifornia()
        {
            var testSubject = new ActusReus();

            //court found defendant was indeed addict but hadn't actually done anything
            testSubject.IsVoluntary = lp => true;
            testSubject.IsAction    = lp => false;

            var testResult = testSubject.IsValid(new Robinson());

            Console.WriteLine(testSubject.ToString());
            Assert.IsFalse(testResult);
        }
コード例 #2
0
ファイル: PowellvTexasTests.cs プロジェクト: nofuture-git/31g
        public void PowellvTexas()
        {
            var testSubject = new ActusReus();

            //being an alcoholic is not actus rea, drinking too much and getting drunk is
            testSubject.IsVoluntary = lp => lp is Powell;
            testSubject.IsAction    = lp => lp is Powell;

            var testResult = testSubject.IsValid(new Powell());

            Console.WriteLine(testSubject.ToString());
            Assert.IsTrue(testResult);
        }