Java 类org.mockito.internal.matchers.Not 实例源码

项目:ibm-performance-monitor    文件:TraceUtilitiesTest.java   
@Test
public void testTraceAndMeasureJoinPointWithLoggerDontPrint() {
    ApplyTraceAspect.printReturnValue = false;
    FakeClassWithAspect.SERVICE_LOGGER.setLevel( Level.FINER );

    classWithAspect.methodWithServiceLogger();

    // expect an exit log
    List<LogRecord> logRecordList = serviceLoggerlogHandler.logRecordList;
    assertEquals( 2, logRecordList.size() );
    LogRecord logRecord = logRecordList.get( 0 );
    String message = logRecord.getMessage();

    logRecord = logRecordList.get( 1 );
    message = logRecord.getMessage();
    System.out.println( message );
    Assert.assertThat( message, new Contains( "<exit" ) );
    Assert.assertThat( message, new Contains( "operation=\"Operation : public java.lang.String com.ibm.logger.FakeClassWithAspect.methodWithServiceLogger()\"" ) );
    Assert.assertThat( message, new Contains( "parameters=\"\"" ) );
    Assert.assertThat( message, new Contains( "cacheHit=\"false\"" ) );
    Assert.assertThat( message, new Contains( "cacheEnabled=\"false\"" ) );
    Assert.assertThat( message, new Contains( "resultSize=\"16\"" ) );
    Assert.assertThat( message, new Not( new Contains( "return=\"Hello to you too\"" ) ) );
}
项目:astor    文件:ArgumentMatcherStorageImpl.java   
public HandyReturnValues reportNot() {
    assertState(!matcherStack.isEmpty(), "No matchers found for Not(?).");
    Not not = new Not(popLastArgumentMatchers(1).get(0));
    matcherStack.push(new LocalizedMatcher(not));
    return new HandyReturnValues();
}
项目:astor    文件:ArgumentMatcherStorageImpl.java   
public HandyReturnValues reportNot() {
    assertStateFor("Not(?)", ONE_SUB_MATCHER);
    Not not = new Not(popLastArgumentMatchers(ONE_SUB_MATCHER).get(0));
    matcherStack.push(new LocalizedMatcher(not));
    return new HandyReturnValues();
}