internal static ExpectationCommand <IEnumerable <object> > Items(this ExpectationCommand <IEnumerable> inner) { // Provide transparent access to either IEnumerable<object> or IEnumerable depending // upon what the matcher implements. This primarily pertains to HaveLengthMatcher so that // it can be used with Array and String using their idiosyncratic handling of // IEnumerable and IEnumerable<T> return(new ExpectationCommand.ItemsCommand(inner)); }
internal static ExpectationCommand <T> NegateIfNeeded <T>(this ExpectationCommand <T> cmd, bool negated) { if (negated) { cmd = cmd.Negated(); } return(cmd); }
internal static void Should <T>(this ExpectationCommand <T> self, ITestMatcher <T> matcher, string message = null, object[] args = null) { var failure = self.Should(matcher); if (failure != null) { AsserterBehavior behavior = failure.AsserterBehavior; behavior.Assert(failure.UpdateTestSubject().UpdateMessage(message, args)); } }
internal EnumerableExpectation(ExpectationCommand <IEnumerable> cmd) { _cmd = cmd; }
public CaptureExceptionCommand(ExpectationCommand <T> inner) { _inner = inner; }
internal TemporalExpectationBuilder(ExpectationCommand <Unit> cmd) { _cmd = cmd; }
public ComparerCommand(IComparer <T> comparer, ExpectationCommand <T> inner) { _inner = inner; _comparer = comparer; }
public static ExpectationCommand <T> Comparer <T>(IComparer <T> comparer, ExpectationCommand <T> inner) { return(new ComparerCommand <T>(comparer, inner)); }
public AnyCommand(ExpectationCommand <IEnumerable> inner) : base(inner) { }
internal ExpectationBuilder(Action thunk, bool negated, string given, AsserterBehavior behavior) { _cmd = ExpectationCommand.TestCode(thunk, negated, given, behavior); }
public ConsistentlyCommand(TimeSpan duration, ExpectationCommand <T> inner) { _duration = duration; _inner = inner; }
public ItemsCommand(ExpectationCommand <IEnumerable> inner) { _inner = inner; }
internal static ExpectationCommand <IEnumerable <T> > Items <T>(this ExpectationCommand <IEnumerable> inner) { return(new ExpectationCommand.ItemsCommand <T>(inner)); }
public CardinalityCommand(ExpectationCommand <IEnumerable> inner, int?min, int?max, bool outer) : base(inner) { _min = min; _max = max; _outer = outer; }
public CastCommand(ExpectationCommand <TFrom> inner) { _inner = inner; }
internal Expectation(ExpectationCommand <Unit> cmd) { _cmd = cmd; }
public PropertyCommand(ExpectationCommand <T> inner, Func <T, TProperty> accessor, string name) { _inner = inner; _accessor = accessor; _name = name; }
public EventuallyCommand(TimeSpan duration, ExpectationCommand <T> inner) { _duration = duration; _inner = inner; }
protected SequenceCommandBase(ExpectationCommand <IEnumerable> inner) { _inner = inner; }