INT-4206: Upgrade to Mockito 2.5
JIRA: https://jira.spring.io/browse/INT-4206 * Fix unnecessary dependency resolution in BOM module * Fix `MessagingMethodInvokerHelper` to handle `$MockitoMock$` generated classed which isn't CGLib `Proxies` any more * Provide fixes for test classes according upgrade to Mockito `2.5` * Fix Ceckstyle do not allow static imports for deprecated Mockito classes
This commit is contained in:
committed by
Gary Russell
parent
e04a8d9948
commit
54654546b9
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -19,8 +19,8 @@ package org.springframework.integration.syslog.inbound;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.mockito.Matchers.any;
|
||||
import static org.mockito.Matchers.anyString;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.ArgumentMatchers.anyString;
|
||||
import static org.mockito.Mockito.doAnswer;
|
||||
import static org.mockito.Mockito.doReturn;
|
||||
import static org.mockito.Mockito.mock;
|
||||
@@ -109,7 +109,7 @@ public class SyslogReceivingChannelAdapterTests {
|
||||
doReturn(true).when(logger).isDebugEnabled();
|
||||
final CountDownLatch sawLog = new CountDownLatch(1);
|
||||
doAnswer(invocation -> {
|
||||
if ((invocation.getArgumentAt(0, String.class)).contains("Error on syslog socket")) {
|
||||
if (((String) invocation.getArgument(0)).contains("Error on syslog socket")) {
|
||||
sawLog.countDown();
|
||||
}
|
||||
invocation.callRealMethod();
|
||||
@@ -184,7 +184,7 @@ public class SyslogReceivingChannelAdapterTests {
|
||||
doReturn(true).when(logger).isDebugEnabled();
|
||||
final CountDownLatch sawLog = new CountDownLatch(1);
|
||||
doAnswer(invocation -> {
|
||||
if ((invocation.getArgumentAt(0, String.class)).contains("Error on syslog socket")) {
|
||||
if (((String) invocation.getArgument(0)).contains("Error on syslog socket")) {
|
||||
sawLog.countDown();
|
||||
}
|
||||
invocation.callRealMethod();
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
log4j.rootCategory=WARN, stdout
|
||||
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stdout.layout.ConversionPattern=%d{HH:mm:ss.SSS} %-5p [%t][%c] %m%n
|
||||
|
||||
log4j.category.org.springframework.integration=WARN
|
||||
log4j.category.org.springframework.integration.syslog=WARN
|
||||
Reference in New Issue
Block a user