예제 #1
0
        public void StatevPinson()
        {
            var testCrime = new Felony
            {
                ActusReus = new Solicitation
                {
                    //Pinson was a buyer and trafficking is for selling
                    IsInduceAnotherToCrime = Pinson.IsSolicitationToTraffic
                },
                MensRea = new SpecificIntent
                {
                    IsKnowledgeOfWrongdoing = lp => lp is Pinson
                }
            };

            var testResult = testCrime.IsValid(new Pinson());

            Console.WriteLine(testCrime.ToString());
            Assert.IsFalse(testResult);
        }
예제 #2
0
        public void StatevSowry()
        {
            var testSubject = new Felony
            {
                ActusReus = new ActusReus
                {
                    IsVoluntary = lp => false,
                    IsAction    = lp => lp is Sowry,
                },
                MensRea = new Knowingly
                {
                    IsKnowledgeOfWrongdoing = lp => lp is Sowry,
                }
            };

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

            Console.WriteLine(testSubject.ToString());
            Assert.IsFalse(testResult);
        }
예제 #3
0
        public void TerrorismTest()
        {
            var testCrime = new Felony
            {
                ActusReus = new Terrorism
                {
                    IsByViolence = lp => lp is ZacariasMoussaoui,
                    IsSocioPoliticalObjective = lp => lp is ZacariasMoussaoui
                },
                MensRea = new MaliceAforethought
                {
                    IsIntentOnWrongdoing    = lp => lp is ZacariasMoussaoui,
                    IsKnowledgeOfWrongdoing = lp => lp is ZacariasMoussaoui
                }
            };
            var testResult = testCrime.IsValid(new ZacariasMoussaoui());

            Console.WriteLine(testCrime.ToString());
            Assert.IsTrue(testResult);
        }
예제 #4
0
        public void ExampleProbableDesistanceTest()
        {
            var testCrime = new Felony
            {
                MensRea = new GeneralIntent
                {
                    IsIntentOnWrongdoing    = lp => lp is JudyEg,
                    IsKnowledgeOfWrongdoing = lp => lp is JudyEg,
                },
                ActusReus = new Attempt
                {
                    IsProbableDesistance = JudyEg.IsJudyEgStealing
                }
            };

            var testResult = testCrime.IsValid(new JudyEg());

            Console.WriteLine(testCrime.ToString());
            Assert.IsTrue(testResult);
        }
        public void ExampleNegligentInvoluntaryManslaughter()
        {
            var testCrime = new Felony
            {
                ActusReus = new ManslaughterInvoluntary
                {
                    IsCorpusDelicti = lp => lp is StevenSheriffEg
                },
                MensRea = new Negligently
                {
                    IsUnawareOfRisk     = lp => lp is StevenSheriffEg,
                    IsUnjustifiableRisk = lp => lp is StevenSheriffEg
                }
            };

            var testResult = testCrime.IsValid(new StevenSheriffEg());

            Console.WriteLine(testCrime.ToString());
            Assert.IsTrue(testResult);
        }
예제 #6
0
        public void TestDrugManfacture()
        {
            var testCrime = new Felony
            {
                ActusReus = new DrugManufacture
                {
                    IsManufacturer = lp => true,
                    Offer          = new ScheduleI("bath salts")
                },
                MensRea = new Purposely
                {
                    IsKnowledgeOfWrongdoing = lp => true,
                    IsIntentOnWrongdoing    = lp => true,
                }
            };
            var testResult = testCrime.IsValid(new CriminalNameHereEg());

            Console.WriteLine(testCrime.ToString());
            Assert.IsTrue(testResult);
        }
예제 #7
0
        public void TestBibery()
        {
            var testCrime = new Felony
            {
                ActusReus = new Bribery
                {
                    IsKnowinglyProcured = lp => lp is IsabelBriberEg,
                    IsPublicOfficial    = lp => lp is IsabelBriberEg
                },
                MensRea = new SpecificIntent
                {
                    IsIntentOnWrongdoing = lp => true
                }
            };

            var testResult = testCrime.IsValid(new IsabelBriberEg());

            Console.WriteLine(testCrime.ToString());
            Assert.IsTrue(testResult);
        }
예제 #8
0
        public void TestSedition()
        {
            var testCrime = new Felony
            {
                ActusReus = new Sedition
                {
                    IsByThreatOfViolence    = lp => lp is MoDisgruntledEg,
                    IsToOverthrowGovernment = lp => lp is MoDisgruntledEg,
                    IsInWrittenForm         = lp => lp is MoDisgruntledEg
                },
                MensRea = new Purposely
                {
                    IsIntentOnWrongdoing = lp => lp is MoDisgruntledEg
                }
            };
            var testResult = testCrime.IsValid(new MoDisgruntledEg());

            Console.WriteLine(testCrime.ToString());
            Assert.IsTrue(testResult);
        }
예제 #9
0
        public void ExampleRequiresSpecificIntent()
        {
            var testCrime = new Felony
            {
                ActusReus = new Conspiracy
                {
                    IsAgreementToCommitCrime = lp => lp is MelissaEg
                },
                MensRea = new GeneralIntent
                {
                    IsKnowledgeOfWrongdoing = lp => lp is MelissaEg,
                    IsIntentOnWrongdoing    = lp => lp is MelissaEg
                }
            };

            var testResult = testCrime.IsValid(new MelissaEg());

            Console.WriteLine(testCrime.ToString());
            Assert.IsFalse(testResult);
        }
예제 #10
0
        public void ExampleFirstDegree()
        {
            var testCrime = new Felony
            {
                ActusReus = new MurderFirstDegree
                {
                    IsPremediated   = JoanniePremedEg.IsPremeditated,
                    IsCorpusDelicti = lp => lp is JoanniePremedEg
                },
                MensRea = new DeadlyWeapon("handgun")
                {
                    IsUtilizable    = lp => lp is JoanniePremedEg,
                    IsCanCauseDeath = lp => lp is JoanniePremedEg
                }
            };

            var testResult = testCrime.IsValid(new JoanniePremedEg());

            Console.WriteLine(testCrime.ToString());
            Assert.IsTrue(testResult);
        }
예제 #11
0
        public void TestThreatenedBatteryAssault_GeneralIntent()
        {
            var testCrime = new Felony
            {
                ActusReus = new ThreatenedBattery
                {
                    IsByThreatOfViolence = lp => ((lp as DianaPistolEg)?.IsAimPistol ?? false) &&
                                           ((DianaPistolEg)lp).IsSheCockGunHammer,
                    IsApparentAbility = lp => lp is DianaPistolEg,
                    Imminence         = new Imminence {
                        IsImmediatePresent = ts => true
                    }
                },
                MensRea = new DeadlyWeapon("pistol", new GeneralIntent())
            };

            var testResult = testCrime.IsValid(new DianaPistolEg());

            Console.WriteLine(testCrime.ToString());
            Assert.IsFalse(testResult);
        }
예제 #12
0
        public void ExampleResIpsaLoquiturTest()
        {
            var testCrime = new Felony
            {
                MensRea = new GeneralIntent
                {
                    IsIntentOnWrongdoing    = lp => lp is HarryEg,
                    IsKnowledgeOfWrongdoing = lp => lp is HarryEg,
                },
                ActusReus = new Attempt
                {
                    IsResIpsaLoquitur = lp => ((lp as HarryEg)?.IsMeetWithHitman ?? false) &&
                                        (((HarryEg)lp).IsPayWithCash2Hitman)
                }
            };

            var testResult = testCrime.IsValid(new HarryEg());

            Console.WriteLine(testCrime.ToString());
            Assert.IsTrue(testResult);
        }
예제 #13
0
        public void ExampleSecondDegree()
        {
            var testCrime = new Felony
            {
                ActusReus = new MurderSecondDegree
                {
                    IsCorpusDelicti = lp => lp is DougCrackheadEg,
                    IsExtremeIndifferenceToHumanLife = lp => DougCrackheadEg.IsSecondDegree(lp)
                },
                MensRea = new Recklessly
                {
                    IsUnjustifiableRisk = lp => lp is DougCrackheadEg,
                    IsDisregardOfRisk   = lp => lp is DougCrackheadEg
                }
            };

            var testResult = testCrime.IsValid(new DougCrackheadEg());

            Console.WriteLine(testCrime.ToString());
            Assert.IsTrue(testResult);
        }
        public void ExampleAdequateProvation()
        {
            var testCrime = new Felony
            {
                ActusReus = new ManslaughterVoluntary
                {
                    IsCorpusDelicti = JoseRagerEg.IsKilledWife
                },
                MensRea = new AdequateProvocation
                {
                    IsReasonableToInciteKilling = lp => lp is JoseRagerEg,
                    IsDefendantActuallyProvoked = lp => lp is JoseRagerEg,
                    IsVictimSourceOfIncite      = lp => lp is JoseRagerEg
                }
            };

            var testResult = testCrime.IsValid(new JoseRagerEg());

            Console.WriteLine(testCrime.ToString());
            Assert.IsTrue(testResult);
        }
예제 #15
0
        public void ExampleRape()
        {
            var testCrime = new Felony
            {
                ActusReus = new Rape
                {
                    IsByThreatOfViolence = lp => lp is AlexGamerEg,
                    IsSexualIntercourse  = lp => lp is AlexGamerEg,
                    IsOneOfTwo           = lp => lp is AlexGamerEg,
                },
                MensRea = new Purposely
                {
                    IsIntentOnWrongdoing = lp => lp is AlexGamerEg
                }
            };

            var testResult = testCrime.IsValid(new AlexGamerEg());

            Console.WriteLine(testCrime.ToString());
            Assert.IsTrue(testResult);
        }
예제 #16
0
        public void TestStatutoryRape()
        {
            var testCrime = new Felony
            {
                ActusReus = new Rape
                {
                    IsSexualIntercourse = lp => lp is AlexGamerEg,
                    IsOneOfTwo          = lp => lp is AlexGamerEg,
                    Consent             = new VictimConsent
                    {
                        IsCapableThereof = lp => ((lp as BrandySisterEg)?.Age ?? 18) >= 16,
                    }
                },
                MensRea = new StrictLiability()
            };

            var testResult = testCrime.IsValid(new AlexGamerEg(), new BrandySisterEg());

            Console.WriteLine(testCrime.ToString());
            Assert.IsTrue(testResult);
        }
예제 #17
0
        public void StatevWest()
        {
            var testCrime = new Felony
            {
                ActusReus = new MurderFirstDegree
                {
                    IsCorpusDelicti = lp => lp is West,
                    IsPremediated   = West.IsPremeditated
                },
                MensRea = new DeadlyWeapon("gun")
                {
                    IsUtilizable    = lp => lp is West,
                    IsCanCauseDeath = lp => lp is West
                }
            };

            var testResult = testCrime.IsValid(new West());

            Console.WriteLine(testCrime.ToString());
            Assert.IsFalse(testResult);
        }
예제 #18
0
        public void ExampleIncest()
        {
            var testCrime = new Felony
            {
                ActusReus = new Incest
                {
                    IsSexualIntercourse = lp => lp is HalIncestEg || lp is HarrietIncestEg,
                    IsOneOfTwo          = lp => lp is HalIncestEg || lp is HarrietIncestEg,
                    IsFamilyRelation    = (lp1, lp2) => (lp1 is HalIncestEg || lp1 is HarrietIncestEg) &&
                                          (lp2 is HalIncestEg || lp2 is HarrietIncestEg)
                },
                MensRea = new GeneralIntent
                {
                    IsKnowledgeOfWrongdoing = lp => lp is HalIncestEg || lp is HarrietIncestEg
                }
            };

            var testResult = testCrime.IsValid(new HalIncestEg(), new HarrietIncestEg());

            Console.WriteLine(testCrime.ToString());
            Assert.IsTrue(testResult);
        }
        public void ExampleIndequateProvocation()
        {
            var testCrime = new Felony
            {
                ActusReus = new ManslaughterVoluntary
                {
                    IsCorpusDelicti = DillonRagerEg.IsKilledFrank
                },
                MensRea = new AdequateProvocation
                {
                    //getting fired is not reason enough
                    IsReasonableToInciteKilling = lp => false,
                    IsDefendantActuallyProvoked = lp => lp is DillonRagerEg,
                    IsVictimSourceOfIncite      = lp => lp is DillonRagerEg
                }
            };

            var testResult = testCrime.IsValid(new DillonRagerEg());

            Console.WriteLine(testCrime.ToString());
            Assert.IsFalse(testResult);
        }
예제 #20
0
        public void StevensvState()
        {
            var testCrime = new Felony
            {
                ActusReus = new ManslaughterVoluntary
                {
                    IsCorpusDelicti = lp => lp is Stevens
                },
                MensRea = new AdequateProvocation
                {
                    IsDefendantActuallyProvoked = lp => lp is Stevens,
                    IsVictimSourceOfIncite      = lp => lp is Stevens,
                    //a child threatening to "tell on you" to his mom is not reasonable
                    IsReasonableToInciteKilling = lp => false
                }
            };

            var testResult = testCrime.IsValid(new Stevens());

            Console.WriteLine(testCrime.ToString());
            Assert.IsFalse(testResult);
        }
예제 #21
0
        public void TestTreasonLevyGeneralIntent()
        {
            var testCrime = new Felony
            {
                ActusReus = new Treason
                {
                    IsByViolence = lp => lp is MildredGillars,
                    WitnessOne   = new Recordings00(),
                    WitnessTwo   = new Recordings01()
                },

                MensRea = new GeneralIntent
                {
                    IsIntentOnWrongdoing = lp => lp is MildredGillars
                }
            };

            var testResult = testCrime.IsValid(new MildredGillars());

            Console.WriteLine(testCrime.ToString());
            Assert.IsFalse(testResult);
        }
예제 #22
0
        public void TreasonTest()
        {
            var testCrime = new Felony
            {
                ActusReus = new Treason
                {
                    //taken oath of allegiance to Hitler
                    IsAdheringToEnemy = lp => lp is MildredGillars,
                    WitnessOne        = new Recordings00(),
                    WitnessTwo        = new Recordings01()
                },
                MensRea = new GeneralIntent
                {
                    IsIntentOnWrongdoing = lp => lp is MildredGillars
                }
            };

            var testResult = testCrime.IsValid(new MildredGillars());

            Console.WriteLine(testCrime.ToString());
            Assert.IsTrue(testResult);
        }
        public void ExampleRiotTest()
        {
            var testCrime = new Felony
            {
                ActusReus = new Riot
                {
                    IsUnreasonablyLoud = lp => lp is BuckShouterEg,
                    IsCombative        = lp => lp is BuckShouterEg,
                    IsGroupMember      = lp => lp is BuckShouterEg,
                    IsByViolence       = lp => lp is BuckShouterEg
                },
                MensRea = new Purposely
                {
                    IsIntentOnWrongdoing = lp => lp is BuckShouterEg
                }
            };
            var testResult = testCrime.IsValid(new BuckShouterEg(), new BuckBudoneEg(), new BuckBudtwoEg(),
                                               new BuckBudthreeEg(), new BuckBudfourEg(), new BuckBudfiveEg());

            Console.WriteLine(testCrime.ToString());
            Assert.IsTrue(testResult);
        }
예제 #24
0
        public void PeoplevTraster()
        {
            //sneaky bastard, a consultant, tricked companies into thinking
            // they needed MS licx, pretends to purchase them from phoney
            // supplier then fakes the any actual docx

            var testCriminalAct = new ByDeception
            {
                IsFalseImpression = lp => lp is Traster,
                IsTakenPossession = lp => lp is Traster,
                SubjectProperty   = new MsLicx()
            };

            var testCrime = new Felony
            {
                ActusReus = testCriminalAct,
                MensRea   = new Purposely
                {
                    IsIntentOnWrongdoing = lp => lp is Traster
                }
            };

            var reliance = new Reliance
            {
                IsReliantOnFalseRepresentation =
                    lp => lp is DemlerArmstrongAndRowlandLawFirm || lp is DemennoKerdoonCompany
            };

            testCrime.AttendantCircumstances.Add(reliance);
            var testResult = testCrime.IsValid(new Traster(), new DemlerArmstrongAndRowlandLawFirm(),
                                               new DemennoKerdoonCompany());

            Console.WriteLine(testCrime.ToString());
            Assert.IsTrue(testResult);

            //this is larceny by trick since the MS Licx titles where still due
            Assert.IsTrue(testCriminalAct.IsLarcenyByTrick);
        }
예제 #25
0
        public void ExampleDeathOccursBefore()
        {
            var testFirstCrime = new Felony
            {
                ActusReus = new ActusReus
                {
                    IsVoluntary = lp => lp is JouquinBurnerEg,
                    IsAction    = lp => lp is JouquinBurnerEg
                },
                MensRea = new Recklessly
                {
                    IsUnjustifiableRisk = lp => lp is JouquinBurnerEg,
                    IsDisregardOfRisk   = lp => lp is JouquinBurnerEg
                }
            };

            var testResult = testFirstCrime.IsValid(new JouquinBurnerEg());

            Console.WriteLine(testFirstCrime.ToString());
            Assert.IsTrue(testResult);
            var yyyy = DateTime.Today.Year;

            var testCrime = new Felony
            {
                ActusReus = new HomicideInOther(testFirstCrime)
                {
                    IsCorpusDelicti = lp => lp is JouquinBurnerEg,
                    Inception       = new DateTime(yyyy, 3, 15, 9, 0, 0),
                    Terminus        = new DateTime(yyyy, 3, 15, 9, 45, 0),
                    TimeOfTheDeath  = new DateTime(yyyy, 3, 15, 10, 0, 0),
                },
                MensRea = testFirstCrime.MensRea
            };

            testResult = testCrime.IsValid(new JouquinBurnerEg());
            Console.WriteLine(testCrime.ToString());
            Assert.IsFalse(testResult);
        }
예제 #26
0
        public void TestSabotage()
        {
            var testCrime = new Felony
            {
                ActusReus = new Sabotage("computer system")
                {
                    IsDamagerOf       = lp => lp is MoSabotageEg,
                    IsDefenseProperty = true,
                    IsEntitledTo      = lp => lp is UsDeptDefense,
                    IsInPossessionOf  = lp => lp is UsDeptDefense
                },
                MensRea = new Purposely
                {
                    IsIntentOnWrongdoing = lp => lp is MoSabotageEg
                },
                AttendantCircumstances = { new NationalEmergency() }
            };

            var testResult = testCrime.IsValid(new MoSabotageEg());

            Console.WriteLine(testCrime.ToString());
            Assert.IsTrue(testResult);
        }
예제 #27
0
        public void PeoplevPratt()
        {
            var testCrime = new Felony
            {
                ActusReus = new ByReceiving
                {
                    IsTakenPossession = lp => lp is Pratt,
                    SubjectProperty   = new LegalProperty("1990 Buick Regal")
                    {
                        IsEntitledTo     = lp => lp is PrattFormerGirlfriend,
                        IsInPossessionOf = lp => lp is PrattFormerGirlfriend,
                        PropertyValue    = dt => 1000.99m
                    },
                    //court finds its stolen, by statute, regardless of intent-to-return
                    IsPresentStolen = lp => lp is Pratt
                }
            };

            var testResult = testCrime.IsValid(new Pratt(), new PrattFormerGirlfriend());

            Console.WriteLine(testCrime.ToString());
            Assert.IsTrue(testResult);
        }
예제 #28
0
        public void PlantervState()
        {
            var testCrime = new Felony
            {
                ActusReus = new Solicitation
                {
                    IsInduceAnotherToCrime = lp =>
                    {
                        //defendant want to get paid to make the hit, not pay for it
                        var wasSolicited = Planter.GetSolicitation(lp);
                        return(string.Equals(wasSolicited, "you do it"));
                    }
                },
                MensRea = new SpecificIntent
                {
                    IsKnowledgeOfWrongdoing = lp => lp is Planter
                }
            };
            var testResult = testCrime.IsValid(new Planter());

            Console.WriteLine(testCrime.ToString());
            Assert.IsFalse(testResult);
        }
예제 #29
0
        public void StatevAndrews()
        {
            var testIntent = new Knowingly
            {
                IsKnowledgeOfWrongdoing = lp => lp is Andrews,
                IsIntentOnWrongdoing    = lp => lp is Andrews
            };

            var testSubject = new Felony
            {
                ActusReus = new ActusReus
                {
                    IsVoluntary = lp => lp is Andrews,
                    IsAction    = lp => lp is Andrews
                },
                MensRea = new Transferred(testIntent)
            };

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

            Console.WriteLine(testSubject.ToString());
            Assert.IsTrue(testResult);
        }
예제 #30
0
        public void TestLackOfConsent()
        {
            var testCrime = new Felony
            {
                ActusReus = new Rape
                {
                    IsSexualIntercourse = lp => lp is AlexGamerEg,
                    IsOneOfTwo          = lp => lp is AlexGamerEg,
                    Consent             = new VictimConsent
                    {
                        IsApprovalExpressed = lp => false,
                    }
                },
                MensRea = new Purposely
                {
                    IsIntentOnWrongdoing = lp => lp is AlexGamerEg
                }
            };

            var testResult = testCrime.IsValid(new AlexGamerEg(), new BrandySisterEg());

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