Exemplo n.º 1
0
 internal static void SetState(
     MockAbstractDataSource <object> dataSource,
     bool isClosed,
     bool isFinished,
     bool hasResult,
     object value,
     bool hasFailed,
     Exception failureCause)
 {
     dataSource.SetState(isClosed, isFinished, hasResult, value, hasFailed, failureCause);
 }
 /// <summary>
 /// Verifies method invocation order and number of invocations
 /// </summary>
 /// <param name="underlyingDataSource"></param>
 protected void VerifyOptionals(MockAbstractDataSource <object> underlyingDataSource)
 {
     underlyingDataSource.VerifyMethodInvocationOrder("IsClosed", 1);
     underlyingDataSource.VerifyMethodInvocationOrder("IsFinished", 2);
     underlyingDataSource.VerifyMethodInvocationOrder("HasResult", 3);
     underlyingDataSource.VerifyMethodInvocationOrder("HasFailed", 4);
     underlyingDataSource.VerifyMethodInvocation("IsClosed", 0);
     underlyingDataSource.VerifyMethodInvocation("IsFinished", 0);
     underlyingDataSource.VerifyMethodInvocation("HasResult", 0);
     underlyingDataSource.VerifyMethodInvocation("HasFailed", 0);
 }