//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldDeliverIntactTransactions() throws java.io.IOException //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldDeliverIntactTransactions() { // GIVEN // tx 1 IList <LogEntry> tx1 = MakeTransaction(TX_START, COMMAND, TX_COMMIT); // tx 2 IList <LogEntry> tx2 = MakeTransaction(TX_START, COMMAND, COMMAND, TX_COMMIT); // All transactions // The cursor TransactionLogEntryCursor transactionCursor = GetTransactionLogEntryCursor(tx1, tx2); // THEN // tx1 assertTrue(transactionCursor.Next()); AssertTx(tx1, transactionCursor.Get()); // tx2 assertTrue(transactionCursor.Next()); AssertTx(tx2, transactionCursor.Get()); // No more transactions assertFalse(transactionCursor.Next()); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void readNonTransactionalEntries() throws java.io.IOException //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ReadNonTransactionalEntries() { IList <LogEntry> recordSet1 = MakeTransaction(CHECK_POINT, CHECK_POINT, CHECK_POINT); IList <LogEntry> recordSet2 = MakeTransaction(CHECK_POINT); TransactionLogEntryCursor transactionCursor = GetTransactionLogEntryCursor(recordSet1, recordSet2); for (int i = 0; i < 4; i++) { assertTrue(transactionCursor.Next()); assertThat(transactionCursor.Get(), arrayWithSize(1)); assertThat(transactionCursor.Get()[0].Type, equalTo(CHECK_POINT)); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void deliverTransactionsWithoutEnd() throws java.io.IOException //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void DeliverTransactionsWithoutEnd() { // GIVEN // tx 1 IList <LogEntry> tx1 = MakeTransaction(TX_START, COMMAND, COMMAND, COMMAND, TX_COMMIT); // tx 2 IList <LogEntry> tx2 = MakeTransaction(TX_START, COMMAND, COMMAND); TransactionLogEntryCursor transactionCursor = GetTransactionLogEntryCursor(tx1, tx2); // THEN assertTrue(transactionCursor.Next()); AssertTx(tx1, transactionCursor.Get()); assertTrue(transactionCursor.Next()); }