Removed reference to hamcrest-all test library, and modified the tests from RetryOperationsInterceptorTests to use vanilla junit assertions.
This commit is contained in:
6
pom.xml
6
pom.xml
@@ -218,12 +218,6 @@
|
||||
<version>4.12</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hamcrest</groupId>
|
||||
<artifactId>hamcrest-all</artifactId>
|
||||
<version>1.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.easymock</groupId>
|
||||
<artifactId>easymock</artifactId>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2007 the original author or authors.
|
||||
* Copyright 2006-2019 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.
|
||||
@@ -16,14 +16,6 @@
|
||||
|
||||
package org.springframework.retry.interceptor;
|
||||
|
||||
import static org.hamcrest.collection.IsMapContaining.hasEntry;
|
||||
import static org.hamcrest.core.AllOf.allOf;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import java.lang.reflect.AccessibleObject;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
@@ -49,6 +41,13 @@ import org.springframework.transaction.support.TransactionSynchronizationAdapter
|
||||
import org.springframework.transaction.support.TransactionSynchronizationManager;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
import static org.hamcrest.core.IsEqual.equalTo;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
public class RetryOperationsInterceptorTests {
|
||||
|
||||
private static int count;
|
||||
@@ -128,10 +127,10 @@ public class RetryOperationsInterceptorTests {
|
||||
this.service.service();
|
||||
assertEquals(2, count);
|
||||
assertEquals(3, monitoringTags.entrySet().size());
|
||||
assertThat(monitoringTags, allOf(hasEntry(labelTagName, label),
|
||||
hasEntry(classTagName,
|
||||
RetryOperationsInterceptorTests.Service.class.getSimpleName()),
|
||||
hasEntry(methodTagName, "service")));
|
||||
assertThat(monitoringTags.get(labelTagName), equalTo(label));
|
||||
assertThat(monitoringTags.get(classTagName),
|
||||
equalTo(RetryOperationsInterceptorTests.Service.class.getSimpleName()));
|
||||
assertThat(monitoringTags.get(methodTagName), equalTo("service"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user