public void TestExecuteWithVarargsAndRetryActionReturnsValidResult() { var driver = new PooledQldbDriver("ledgerName", mockClient.Object, 4, 1, 10, NullLogger.Instance); var result = driver.Execute("testStatement", (int k) => { return; }, new IIonValue[] { }); Assert.IsNotNull(result); }
public void TestExecuteWithParamsReturnsValidResult() { var driver = new PooledQldbDriver("ledgerName", mockClient.Object, 4, 1, 10, NullLogger.Instance); var result = driver.Execute("testStatement", new List <IIonValue>()); Assert.IsNotNull(result); }
public void TestExecuteWithActionLambdaAndRetryActionCanInvokeSuccessfully() { var driver = new PooledQldbDriver("ledgerName", mockClient.Object, 4, 1, 10, NullLogger.Instance); driver.Execute((txn) => { txn.Execute("testStatement"); }, (int k) => { return; }); }
public void TestExecuteWithFuncLambdaAndRetryActionReturnsFuncOutput() { var driver = new PooledQldbDriver("ledgerName", mockClient.Object, 4, 1, 10, NullLogger.Instance); driver.Dispose(); Assert.ThrowsException <ObjectDisposedException>(() => driver.Execute((txn) => { txn.Execute("testStatement"); return("testReturnValue"); }, (int k) => { return; })); }
public void TestExecuteWithFuncLambdaReturnsFuncOutput() { var driver = new PooledQldbDriver("ledgerName", mockClient.Object, 4, 1, 10, NullLogger.Instance); var result = driver.Execute((txn) => { txn.Execute("testStatement"); return("testReturnValue"); }); Assert.AreEqual("testReturnValue", result); }