Examples of verifyNoMoreInteractions()


Examples of org.mockito.InOrder.verifyNoMoreInteractions()

        subject.preHandle(request, new MockHttpServletResponse(), this);

        final InOrder order = inOrder(serverTracer);
        order.verify(serverTracer).setStateUnknown(eq(name));
        order.verify(serverTracer).setServerReceived();
        order.verifyNoMoreInteractions();

        verify(submitter).endPointSubmitted();
        verifyNoMoreInteractions(submitter);
    }
View Full Code Here

Examples of org.mockito.InOrder.verifyNoMoreInteractions()

        subject.preHandle(request, new MockHttpServletResponse(), this);

        final InOrder order = inOrder(serverTracer);
        order.verify(serverTracer).setStateCurrentTrace(eq(traceId), eq(spanId), eq(parentSpanId), eq(name));
        order.verify(serverTracer).setServerReceived();
        order.verifyNoMoreInteractions();

        verify(submitter).endPointSubmitted();
        verifyNoMoreInteractions(submitter);
    }
View Full Code Here

Examples of org.mockito.InOrder.verifyNoMoreInteractions()

        order.verify(clientTracer).startNewSpan("query");
        order.verify(clientTracer).setCurrentClientServiceName(eq(schema));
        order.verify(clientTracer).submitBinaryAnnotation(eq("executed.query"), eq(sql));
        order.verify(clientTracer).setClientSent();
        order.verifyNoMoreInteractions();
    }

    @Test
    public void preProcessShouldBeginTracingPreparedStatementCall() throws Exception {
        final String sql = randomAlphanumeric(20);
View Full Code Here

Examples of org.mockito.InOrder.verifyNoMoreInteractions()

        order.verify(clientTracer).startNewSpan("query");
        order.verify(clientTracer).setCurrentClientServiceName(eq(schema));
        order.verify(clientTracer).submitBinaryAnnotation(eq("executed.query"), eq(sql));
        order.verify(clientTracer).setClientSent();
        order.verifyNoMoreInteractions();
    }

    @Test
    public void postProcessShouldNotFailIfNoClientTracer() throws Exception {
        MySQLStatementInterceptor.setClientTracer(Optional.<ClientTracer>absent());
View Full Code Here

Examples of org.mockito.InOrder.verifyNoMoreInteractions()

        final InOrder order = inOrder(clientTracer);

        order.verify(clientTracer).submitBinaryAnnotation(eq("warning.count"), eq(warningCount));
        order.verify(clientTracer).submitBinaryAnnotation(eq("error.code"), eq(errorCode));
        order.verify(clientTracer).setClientReceived();
        order.verifyNoMoreInteractions();
    }

    @Test
    public void postProcessShouldFinishTracingSuccessfulSQLCall() throws Exception {
View Full Code Here

Examples of org.mockito.InOrder.verifyNoMoreInteractions()

        assertNull(subject.postProcess("sql", mock(Statement.class), mock(ResultSetInternalMethods.class), mock(Connection.class), 0, true, true, null));

        final InOrder order = inOrder(clientTracer);

        order.verify(clientTracer).setClientReceived();
        order.verifyNoMoreInteractions();
    }

    @Test
    public void executeTopLevelOnlyShouldOnlyExecuteTopLevelQueries() throws Exception {
        assertTrue(subject.executeTopLevelOnly());
View Full Code Here

Examples of org.mockito.InOrder.verifyNoMoreInteractions()

      // check interaction with query cache - expect a cache miss
      InOrder inOrder = inOrder(queryCacheSpy);
      inOrder.verify(queryCacheSpy, calls(1)).get(queryCacheKey);
      ArgumentCaptor<LuceneQueryParsingResult> captor = ArgumentCaptor.forClass(LuceneQueryParsingResult.class);
      inOrder.verify(queryCacheSpy, calls(1)).put(eq(queryCacheKey), captor.capture());
      inOrder.verifyNoMoreInteractions();
      assertNull(lastGetResult.get());
      assertTrue(captor.getValue() == cachedParsingResult)// == is intentional here!

      // reset interaction and try again
      reset(queryCacheSpy);
View Full Code Here

Examples of org.mockito.InOrder.verifyNoMoreInteractions()

      // check interaction with query cache - expect a cache hit
      inOrder = inOrder(queryCacheSpy);
      inOrder.verify(queryCacheSpy, calls(1)).get(queryCacheKey);
      inOrder.verify(queryCacheSpy, never()).put(any(KeyValuePair.class), any(LuceneQueryParsingResult.class));
      inOrder.verifyNoMoreInteractions();
      assertTrue(lastGetResult.get() == cachedParsingResult)// == is intentional here!
   }

   private AtomicReference<Object> captureLastGetResult(QueryCache queryCacheSpy) {
      final AtomicReference<Object> lastResult = new AtomicReference<Object>();
View Full Code Here

Examples of org.mockito.InOrder.verifyNoMoreInteractions()

    upgraderOrder.verify(upgrader, times(2)).upgrade(any(MConnectionForms.class), any(MConnectionForms.class));
    upgraderOrder.verify(upgrader, times(2)).upgrade(any(MJobForms.class), any(MJobForms.class));
    upgraderOrder.verifyNoMoreInteractions();
    validatorOrder.verify(validator, times(2)).validateConnection(anyObject());
    validatorOrder.verify(validator, times(2)).validateJob(any(MJob.Type.class), anyObject());
    validatorOrder.verifyNoMoreInteractions();
  }

  /**
   * Test the connector upgrade procedure, when all the connections and
   * jobs using the old connector are invalid for the new connector
View Full Code Here

Examples of org.mockito.InOrder.verifyNoMoreInteractions()

      upgraderOrder.verify(upgrader, times(2)).upgrade(any(MConnectionForms.class), any(MConnectionForms.class));
      upgraderOrder.verify(upgrader, times(2)).upgrade(any(MJobForms.class), any(MJobForms.class));
      upgraderOrder.verifyNoMoreInteractions();
      validatorOrder.verify(validator, times(2)).validateConnection(anyObject());
      validatorOrder.verify(validator, times(2)).validateJob(any(MJob.Type.class), anyObject());
      validatorOrder.verifyNoMoreInteractions();
      return ;
    }

    fail("Should throw out an exception with code: " + RepositoryError.JDBCREPO_0027);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.