public void MohrvWilliams() { var test = new TrespassToChattels { Causation = new Causation(ExtensionMethods.Tortfeasor) { FactualCause = new FactualCause(ExtensionMethods.Tortfeasor) { IsButForCaused = lp => lp is Mohr }, ProximateCause = new ProximateCause(ExtensionMethods.Tortfeasor) { IsForeseeable = lp => true } }, //the consent was for the other ear Consent = new Consent(ExtensionMethods.Tortfeasor) { IsApprovalExpressed = lp => false, IsCapableThereof = lp => true }, IsCauseDispossession = lp => true, IsTangibleEntry = lp => true, Injury = new Damage(ExtensionMethods.Tortfeasor) { SubjectProperty = new LegalProperty("Williams hearing") { IsEntitledTo = lp => lp is Williams, IsInPossessionOf = lp => lp is Williams, }, ToNormalFunction = lp => true }, SubjectProperty = new LegalProperty("Williams hearing") }; var testResult = test.IsValid(new Mohr(), new Williams()); Console.WriteLine(test.ToString()); Assert.IsTrue(testResult); }
public void IntelCorpvHamidi() { var testSubject = new TrespassToChattels { Consent = new Consent { IsApprovalExpressed = lp => false, IsCapableThereof = lp => lp is IntelCorp }, SubjectProperty = new PersonalProperty { Name = "Intel Corp computer system", IsEntitledTo = lp => lp is IntelCorp, IsInPossessionOf = lp => lp is IntelCorp }, Causation = new Causation(ExtensionMethods.Tortfeasor) { FactualCause = new FactualCause(ExtensionMethods.Tortfeasor) { IsButForCaused = lp => lp is Hamidi }, ProximateCause = new ProximateCause(ExtensionMethods.Tortfeasor) { IsForeseeable = lp => lp is Hamidi } }, Injury = new Damage(ExtensionMethods.Tortfeasor) { ToNormalFunction = p => false, ToUsefulness = p => false, ToValue = p => false }, IsCauseDispossession = lp => false }; var testResult = testSubject.IsValid(new IntelCorp(), new Hamidi()); Console.WriteLine(testSubject.ToString()); Assert.IsFalse(testResult); }