예제 #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
            RunMessage message = new RunMessage("RETURN 1");

            // 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 shouldParseTransactionTimeoutCorrectly() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        internal virtual void ShouldParseTransactionTimeoutCorrectly()
        {
            // Given
            IDictionary <string, object> msgMetadata = map("tx_timeout", 123456L);
            MapValue meta = ValueUtils.asMapValue(msgMetadata);

            // When
            RunMessage runMessage = new RunMessage("RETURN 1", EMPTY_MAP, meta);

            // Then
            assertThat(runMessage.TransactionTimeout().toMillis(), equalTo(123456L));
        }
예제 #3
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
            RunMessage runMessage = new RunMessage("RETURN 1", EMPTY_MAP, meta);

            // Then
            assertThat(runMessage.TransactionMetadata().ToString(), equalTo(txMetadata.ToString()));
        }
예제 #4
0
        public override bool Equals(object o)
        {
            if (this == o)
            {
                return(true);
            }
            if (o == null || this.GetType() != o.GetType())
            {
                return(false);
            }
            RunMessage that = ( RunMessage )o;

            return(Objects.Equals(_statement, that._statement) && Objects.Equals(@params, that.@params) && Objects.Equals(_meta, that._meta));
        }