//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testConversationStop() public virtual void TestConversationStop() { RequestContext requestContext = RequestContext; _conversationManager = ConversationManager; Conversation conversation = mock(typeof(Conversation)); when(conversation.Active).thenReturn(true); TimedRepository conversationStorage = mock(typeof(TimedRepository)); when(conversationStorage.end(requestContext)).thenReturn(conversation); _conversationManager.conversations = conversationStorage; _conversationManager.stop(requestContext); verify(conversationStorage).end(requestContext); verify(conversation).stop(); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testConversationWorkflow() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void TestConversationWorkflow() { RequestContext requestContext = RequestContext; _conversationManager = ConversationManager; TimedRepository conversationStorage = mock(typeof(TimedRepository)); _conversationManager.conversations = conversationStorage; _conversationManager.begin(requestContext); _conversationManager.acquire(requestContext); _conversationManager.release(requestContext); _conversationManager.end(requestContext); InOrder conversationOrder = inOrder(conversationStorage); conversationOrder.verify(conversationStorage).begin(requestContext); conversationOrder.verify(conversationStorage).acquire(requestContext); conversationOrder.verify(conversationStorage).release(requestContext); conversationOrder.verify(conversationStorage).end(requestContext); }
protected internal override TimedRepository <RequestContext, Conversation> CreateConversationStore() { ConversationStore = new TimedRepository <RequestContext, Conversation>(ConversationFactory, ConversationReaper, 1, Clocks.systemClock()); return(ConversationStore); }
public override void Stop() { _staleReaperJob.cancel(false); Conversations = null; }
public override void Start() { Conversations = CreateConversationStore(); _staleReaperJob = _spi.scheduleRecurringJob(Group.SLAVE_LOCKS_TIMEOUT, _activityCheckIntervalMillis, Conversations); }