public async Task TestAsyncExecuteNoParamsDelegatesCallToTransaction()
        {
            var actualResult = await asyncTransactionExecutor.Execute(query);

            mockTransaction.Verify(transaction => transaction.Execute(query), Times.Exactly(1));
            Assert.AreEqual(mockResult.Object, actualResult);
        }
Beispiel #2
0
        private async Task <Amazon.QLDB.Driver.IAsyncResult> Insert <T>(AsyncTransactionExecutor transactionExecutor, string tableName, T value)
        {
            IIonValue ionValue = IonLoader.Default.Load(JsonConvert.SerializeObject(value));

            return(await transactionExecutor.Execute($"INSERT INTO {tableName} ?", ionValue));
        }