public void BatsakisvDemotsis() { var testContract = new ComLawContract <Promise> { Offer = new OfferTwoThousandUsdDuringWar(), Acceptance = o => o is OfferTwoThousandUsdDuringWar ? new AcceptTwoThousandUsdDuringWar() : 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 ByUnconscionability <Promise>(testContract); var testResult = testSubject.IsValid(new Batsakis(), new Demotsis()); //this case is present to present an unconscionable contract Assert.IsFalse(testResult); Console.WriteLine(testSubject.ToString()); }
public void WilliamsvWalkerThom() { var testContract = new ComLawContract <Promise> { Offer = new OfferPurchaseOnCredit(), Acceptance = o => o is OfferPurchaseOnCredit ? new AcceptPurchaseOnCredit() : 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 ByUnconscionability <Promise>(testContract) { IsUnreasonablyFavorableTerms = lp => lp is WalkerThom }; var testResult = testSubject.IsValid(new WalkerThom(), new Williams()); Console.WriteLine(testSubject.ToString()); Assert.IsTrue(testResult); }