public async Task ShouldRetrieveLastTableRecord() { var tableName = "integrationhistory"; await _sut.DeleteTableAsync(tableName); await _sut.CreateTableAsync(tableName); var transactionCheckHistory1 = new TransactionCheckHistory(); await _sut.InsertOrMergeEntity(tableName, transactionCheckHistory1); Thread.Sleep(TimeSpan.FromSeconds(2)); var transactionCheckHistory2 = new TransactionCheckHistory(); await _sut.InsertOrMergeEntity(tableName, transactionCheckHistory2); var tableRecord = _sut.RetrieveFirst <TransactionCheckHistory>(tableName, AzureTableConstants.TransactionCheckHistory.PartitionKey); Assert.NotNull(tableRecord); Assert.AreEqual(transactionCheckHistory2.RowKey, tableRecord.RowKey); await _sut.Delete(tableName, transactionCheckHistory2); tableRecord = _sut.RetrieveFirst <TransactionCheckHistory>(tableName, AzureTableConstants.TransactionCheckHistory.PartitionKey); Assert.NotNull(tableRecord); Assert.AreEqual(transactionCheckHistory1.RowKey, tableRecord.RowKey); }