public void SherwoodvWalker() { var testContract = new ComLawContract <Promise> { Offer = new OfferSellCow(), Acceptance = o => o is OfferSellCow ? new AcceptSellCow() : null, Assent = new MutualAssent { IsApprovalExpressed = lp => true, TermsOfAgreement = lp => (lp as Sherwood)?.GetTerms() ?? (lp as Walker)?.GetTerms() } }; testContract.Consideration = new Consideration <Promise>(testContract) { IsGivenByOfferee = (lp, p) => true, IsSoughtByOfferor = (lp, p) => true }; var testSubject = new ByFraud <Promise>(testContract); var testResult = testSubject.IsValid(new Sherwood(), new Walker()); Assert.IsFalse(testResult); Console.WriteLine(testSubject.ToString()); }
public void WoodvBoynton() { var testContract = new ComLawContract <Promise> { Offer = new OfferSmallStone(), Acceptance = o => o is OfferSmallStone ? new AcceptSmallStone() : null, Assent = new MutualAssent { IsApprovalExpressed = lp => true, TermsOfAgreement = lp => GetTerms() } }; testContract.Consideration = new Consideration <Promise>(testContract) { IsGivenByOfferee = (lp, p) => true, IsSoughtByOfferor = (lp, p) => true }; //court found there was no misrepresentation var testSubject = new ByFraud <Promise>(testContract); var testResult = testSubject.IsValid(new Boynton(), new Wood()); Assert.IsFalse(testResult); Console.WriteLine(testSubject.ToString()); }
public void AlabivDhlAirways() { var testContract = new ComLawContract <Promise> { Offer = new OfferShipCashUndeclared(), Acceptance = o => o is OfferShipCashUndeclared ? new AcceptShipCashUndeclared() : null, Assent = new MutualAssent { IsApprovalExpressed = lp => true, TermsOfAgreement = lp => GetTerms() } }; testContract.Consideration = new Consideration <Promise>(testContract) { IsGivenByOfferee = (lp, p) => true, IsSoughtByOfferor = (lp, p) => true }; var testSubject = new ByFraud <Promise>(testContract) { Misrepresentation = new Misrepresentation <Promise>(testContract) { /* plaintiff had reason to know DHL would not accept * cash and describing the shipment as otherwise, he * induced DHL to enter into a contract to which it * would not otherwise assent to */ IsAssertionToInduceAssent = lp => lp is Alabi }, /*the misrepresentation was a substantial factor in DHL's * decision to enter into the contracts at issue*/ IsRecipientInduced = lp => lp is DhlAirways, IsRecipientRelianceReasonable = lp => lp is DhlAirways }; var testResult = testSubject.IsValid(new Alabi(), new DhlAirways()); Assert.IsTrue(testResult); Console.WriteLine(testSubject.ToString()); }