public void BankervMcLaughlin() { var property = new LegalProperty("some hole") { IsEntitledTo = lp => lp is Banker, IsInPossessionOf = lp => lp is Banker }; var test = new OfLandOwner(ExtensionMethods.Tortfeasor) { SubjectProperty = property, Consent = new Consent(ExtensionMethods.Tortfeasor) { IsCapableThereof = lp => true, IsApprovalExpressed = lp => false }, AttractiveNuisance = new AttractiveNuisanceTerm(ExtensionMethods.Tortfeasor) { IsLocatedWhereChildrenLikelyAre = p => p.Equals(property), IsArtificialCondition = p => p.Equals(property), IsDangerOutweighUse = p => p.Equals(property), IsDangerToChildren = p => p.Equals(property), IsOwnerFailMitigateDanger = lp => true, } }; var testResult = test.IsValid(new Banker(), new McLaughlin()); Console.WriteLine(test.ToString()); Assert.IsTrue(testResult); }
public void MadsenvEastJordanIrrigationCo() { var property = new LegalProperty("cannibal minks"); var test = new AbnormallyDangerousActivity(ExtensionMethods.Tortfeasor) { Causation = new Causation(ExtensionMethods.Tortfeasor) { FactualCause = new FactualCause(ExtensionMethods.Tortfeasor) { IsButForCaused = lp => lp is EastJordanIrrigationCo }, ProximateCause = new ProximateCause(ExtensionMethods.Tortfeasor) { IsDirectCause = lp => false, IsForeseeable = lp => false, } }, IsExplosives = p => true, SubjectProperty = property, Injury = new Damage(ExtensionMethods.Tortfeasor) { SubjectProperty = property, ToValue = p => true //they are dead } }; var testResult = test.IsValid(new Madsen(), new EastJordanIrrigationCo()); Console.WriteLine(test.ToString()); Assert.IsFalse(testResult); }
public void EnsignvWalls() { var property = new LegalProperty("13949 Dacosta Street") { IsInPossessionOf = lp => lp is Walls, IsEntitledTo = lp => lp is Walls }; var test = new PrivateNuisance(ExtensionMethods.Tortfeasor) { SubjectProperty = property, IsInvasionOfProtectableInterest = lp => lp is Ensign, IsNegligentInvasion = lp => lp is Walls }; var testResult = test.IsValid(new Ensign(), new Walls()); Assert.IsTrue(testResult); Console.WriteLine(test.ToString()); }
public void SpanovPeriniCorp() { var property = new LegalProperty("garage in Brooklyn"); var test = new AbnormallyDangerousActivity(ExtensionMethods.Tortfeasor) { IsExplosives = p => p.Equals(property), SubjectProperty = property, Injury = new Damage(ExtensionMethods.Tortfeasor) { SubjectProperty = property, ToValue = p => true, }, }; var testResult = test.IsValid(new Spano(), new PeriniCorp()); Assert.IsTrue(testResult); Console.WriteLine(test.ToString()); }
public void ExampleThreatenHonestlyDue() { var trent = new TrentThreatenEg(); var thousandDollars = new LegalProperty("thousand dollars") { IsEntitledTo = lp => lp.IsSamePerson(trent), PropertyValue = dt => 10000m }; var testAct = new ByExtortion { IsTakenPossession = lp => lp is TrentThreatenEg, Threatening = new ByExtortion.ByThreatening { IsToExposeHurtfulSecret = lp => lp is TrentThreatenEg }, SubjectProperty = thousandDollars, }; var testResult = testAct.IsValid(new TrentThreatenEg(), new TaraLyingEg()); Console.WriteLine(testAct.ToString()); Assert.IsFalse(testResult); }
public void FortyFiveTwentyFiveIncvFontainebleauHotelCorp() { var rocHotel = new LegalProperty("Roc Hotel") { IsEntitledTo = lp => lp is FortyFiveTwentyFiveInc, IsInPossessionOf = lp => lp is FortyFiveTwentyFiveInc }; var test = new PrivateNuisance(ExtensionMethods.Tortfeasor) { IsIntentionalInvasion = lp => lp is FontainebleauHotelCorp, IsInvasionOfProtectableInterest = lp => false, SubjectProperty = rocHotel, Consent = new Consent(ExtensionMethods.Tortfeasor) { IsApprovalExpressed = lp => false, IsCapableThereof = lp => true } }; var testResult = test.IsValid(new FortyFiveTwentyFiveInc(), new FontainebleauHotelCorp()); Assert.IsFalse(testResult); Console.WriteLine(test.ToString()); }