예제 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldMoveToFailedStateOnBegin_fail() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        internal virtual void ShouldMoveToFailedStateOnBeginFail()
        {
            // Given
            BoltStateMachineV3 machine = NewStateMachine();

            machine.Process(NewHelloMessage(), nullResponseHandler());

            // When
            BoltResponseRecorder recorder     = new BoltResponseRecorder();
            BeginMessage         beginMessage = mock(typeof(BeginMessage));

            when(beginMessage.Bookmark()).thenThrow(new Exception("Fail"));
            machine.Process(beginMessage, recorder);

            // Then
            assertThat(recorder.NextResponse(), failedWithStatus(Org.Neo4j.Kernel.Api.Exceptions.Status_General.UnknownError));
            assertThat(machine.State(), instanceOf(typeof(FailedState)));
        }
예제 #2
0
 public void HandleBeginMessage(BeginMessage beginMessage)
 {
     _dataManager.Begin();
 }