public Ouster(TenancyInCommon sharedPropertyInterest) { if (sharedPropertyInterest == null) { return; } SubjectProperty = sharedPropertyInterest.SubjectProperty; _isEqualRightToPossessWhole = sharedPropertyInterest.IsEqualRightToPossessWhole; }
public void OlivasvOlivas() { var testsubject = new TenancyInCommon { IsEqualRightToPossessWhole = lp => lp is SamOlivas || lp is CarolinaOlivas }; var testResult = testsubject.IsValid(new SamOlivas(), new CarolinaOlivas()); Assert.IsTrue(testResult); Console.WriteLine(testsubject.ToString()); var testSubject2 = new Ouster(testsubject) { IsVacated = p => p is SamOlivas }; testResult = testSubject2.IsValid(new SamOlivas(), new CarolinaOlivas()); Assert.IsFalse(testResult); Console.WriteLine(testSubject2.ToString()); }