public void CharriervBell() { var test = new AbandonedProperty(ExtensionMethods.Defendant) { SubjectProperty = new LegalProperty("artifacts on Trudeau Plantation"), Relinquishment = new Entombed() }; var testResult = test.IsValid(new Charrier(), new Bell()); Assert.IsFalse(testResult); Console.WriteLine(test.ToString()); }
public void TestAbandonedProperty() { var test = new AbandonedProperty(PropertyOwner) { //willingly walks away from property Relinquishment = new Act(PropertyOwner) { IsVoluntary = lp => lp.IsSamePerson(_propertyOwner), IsAction = lp => lp.IsSamePerson(_propertyOwner) }, SubjectProperty = _property }; var testResult = test.IsValid(_propertyOwner); Assert.IsTrue(testResult); Console.Write(test.ToString()); }
public void PopovvHayashi() { var baseball = new HistoricBaseball(); var mlb = new MajorLeagueBaseball(); baseball.IsEntitledTo = lp => lp.IsSamePerson(mlb); baseball.IsInPossessionOf = lp => lp.IsSamePerson(mlb); var hitBall = new AbandonedProperty(ExtensionMethods.Defendant) { SubjectProperty = baseball, Relinquishment = new Act(ExtensionMethods.ThirdParty) { IsAction = lp => lp is MajorLeagueBaseball, IsVoluntary = lp => lp is MajorLeagueBaseball } }; var testResult = hitBall.IsValid(new Popov(), new Hayashi(), new MajorLeagueBaseball()); Assert.IsTrue(testResult); baseball.IsInPossessionOf = lp => lp is Hayashi; var test = new TakePossession(ExtensionMethods.Plaintiff) { ClaimantAction = new CompleteControlOverTheBall(ExtensionMethods.Plaintiff) { IsVoluntary = lp => true, IsAction = lp => true, IsMomentumOfBallAndFanCeased = lp => lp is Hayashi }, //court doesn't consider thoughts relevant ClaimantIntent = null, SubjectProperty = baseball }; testResult = test.IsValid(new Popov(), new Hayashi(), new MajorLeagueBaseball()); Assert.IsFalse(testResult); Console.WriteLine(test.ToString()); }