Ejemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void stopShouldFirstMarkStateMachineForTermination()
        public virtual void StopShouldFirstMarkStateMachineForTermination()
        {
            BoltConnection connection = NewConnection();

            connection.Stop();

            verify(_stateMachine).markForTermination();
            verify(_queueMonitor).enqueued(ArgumentMatchers.eq(connection), any(typeof(Job)));
        }
Ejemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void stopShouldCloseStateMachineOnProcessNextBatch()
        public virtual void StopShouldCloseStateMachineOnProcessNextBatch()
        {
            BoltConnection connection = NewConnection();

            connection.Stop();

            connection.ProcessNextBatch();

            verify(_queueMonitor).enqueued(ArgumentMatchers.eq(connection), any(typeof(Job)));
            verify(_stateMachine).markForTermination();
            verify(_stateMachine).close();
        }
Ejemplo n.º 3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void stopShouldCloseStateMachineIfEnqueueEndsWithRejectedExecutionException()
        public virtual void StopShouldCloseStateMachineIfEnqueueEndsWithRejectedExecutionException()
        {
            BoltConnection connection = NewConnection();

            doAnswer(i =>
            {
                connection.HandleSchedulingError(new RejectedExecutionException());
                return(null);
            }).when(_queueMonitor).enqueued(ArgumentMatchers.eq(connection), any(typeof(Job)));

            connection.Stop();

            verify(_stateMachine).markForTermination();
            verify(_stateMachine).close();
        }