Exemple #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldThrowExceptionIfFailedToParseTransactionTimeoutCorrectly() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        internal virtual void ShouldThrowExceptionIfFailedToParseTransactionTimeoutCorrectly()
        {
            // Given
            IDictionary <string, object> msgMetadata = map("tx_timeout", "invalid value type");
            MapValue meta = ValueUtils.asMapValue(msgMetadata);
            // When & Then
            BoltIOException exception = assertThrows(typeof(BoltIOException), () => new RunMessage("RETURN 1", EMPTY_MAP, meta));

            assertThat(exception.Message, startsWith("Expecting transaction timeout value to be a Long value"));
        }
Exemple #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldThrowExceptionIfFailedToParseTransactionMetadataCorrectly() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        internal virtual void ShouldThrowExceptionIfFailedToParseTransactionMetadataCorrectly()
        {
            // Given
            IDictionary <string, object> msgMetadata = map("tx_metadata", "invalid value type");
            MapValue meta = ValueUtils.asMapValue(msgMetadata);
            // When & Then
            BoltIOException exception = assertThrows(typeof(BoltIOException), () => new BeginMessage(meta));

            assertThat(exception.Message, startsWith("Expecting transaction metadata value to be a Map value"));
        }