public void VerifyNothingElse(int time) { var expectations = Expectations.Where(e => e.Time == time).Where(e => e.Marble == null).ToList(); if (!expectations.Any()) { return; } foreach (var exp in expectations) { try { exp.Assertion(); } catch (Exception e) { throw new Exception( $"At time {time}, unexpected events were received {ErrorMessageHelper.SequenceWithPointerToOffendingMoment(Sequence, time)}{Environment.NewLine}{e.Message}.", e); } } }
public void Verify(int time) { var expectations = Expectations.Where(e => e.Time == time).Where(e => e.Marble != null).ToList(); InvokeAssertions(time, expectations); }