Esempio n. 1
0
 public static assert A_sell_order_for_20_shares_of_MSFT_stock_should_have_been_executed(this assert fixtures) =>
 fixtures.Expect(x => x.Stocks.Orders["MSFT"].Should().Be(20));
Esempio n. 2
0
 public static assert I_should_have_80_shares_of_MSFT_stock(this assert fixtures) =>
 fixtures.Expect(x => x.Stocks.Shares["MSFT"].Should().Be(80));
Esempio n. 3
0
 public static assert I_should_have_150_shares_of_APPL_stock(this assert fixtures) =>
 fixtures.Expect(x => x.Stocks.Shares["APPL"].Should().Be(150));
 private static ReportEntry ReportIssue(rule rule, string context, string phase, assert assrt,
     ValidationSource validationSource)
 {
     return new ReportEntry
     {
         AssertId = assrt.id,
         Context = context,
         Phase = phase,
         Query = assrt.test,
         RuleId = rule.id,
         Detail = assrt.Text.Aggregate((t1, t2) => string.Format("{0} {1}", t1, t2)),
         ValidationSource = validationSource
     };
 }