예제 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldParseEmptyTransactionMetadataCorrectly() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        internal virtual void ShouldParseEmptyTransactionMetadataCorrectly()
        {
            // When
            BeginMessage message = new BeginMessage();

            // Then
            assertNull(message.TransactionMetadata());
        }
예제 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldParseTransactionMetadataCorrectly() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        internal virtual void ShouldParseTransactionMetadataCorrectly()
        {
            // Given
            IDictionary <string, object> txMetadata  = map("creation-time", Duration.ofMillis(4321L));
            IDictionary <string, object> msgMetadata = map("tx_metadata", txMetadata);
            MapValue meta = ValueUtils.asMapValue(msgMetadata);

            // When
            BeginMessage beginMessage = new BeginMessage(meta);

            // Then
            assertThat(beginMessage.TransactionMetadata().ToString(), equalTo(txMetadata.ToString()));
        }