Enforces static imports for JUnit 4 assertions and assumptions
This commit configures Checkstyle to enforces static imports for JUnit 4 assertions and assumptions. See gh-22932
This commit is contained in:
parent
deecab6311
commit
73dbd06361
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
package org.springframework.cache.aspectj;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.cache.Cache;
|
||||
|
|
@ -44,7 +43,7 @@ public class AspectJCacheAnnotationTests extends AbstractCacheAnnotationTests {
|
|||
public void testKeyStrategy() throws Exception {
|
||||
AnnotationCacheAspect aspect = ctx.getBean(
|
||||
"org.springframework.cache.config.internalCacheAspect", AnnotationCacheAspect.class);
|
||||
Assert.assertSame(ctx.getBean("keyGenerator"), aspect.getKeyGenerator());
|
||||
assertSame(ctx.getBean("keyGenerator"), aspect.getKeyGenerator());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-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,13 +16,14 @@
|
|||
|
||||
package org.springframework.cache.config;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.cache.interceptor.CacheInterceptor;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.context.support.GenericXmlApplicationContext;
|
||||
|
||||
import static org.junit.Assert.assertSame;
|
||||
|
||||
/**
|
||||
* @author Costin Leau
|
||||
* @author Chris Beams
|
||||
|
|
@ -38,7 +39,7 @@ public class CacheAdviceNamespaceTests extends AbstractCacheAnnotationTests {
|
|||
@Test
|
||||
public void testKeyStrategy() throws Exception {
|
||||
CacheInterceptor bean = this.ctx.getBean("cacheAdviceClass", CacheInterceptor.class);
|
||||
Assert.assertSame(this.ctx.getBean("keyGenerator"), bean.getKeyGenerator());
|
||||
assertSame(this.ctx.getBean("keyGenerator"), bean.getKeyGenerator());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ import java.sql.SQLException;
|
|||
import java.sql.Types;
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
|
|
@ -232,7 +231,7 @@ public class SimpleJdbcCallTests {
|
|||
|
||||
|
||||
private void verifyStatement(SimpleJdbcCall adder, String expected) {
|
||||
Assert.assertEquals("Incorrect call statement", expected, adder.getCallString());
|
||||
assertEquals("Incorrect call statement", expected, adder.getCallString());
|
||||
}
|
||||
|
||||
private void initializeAddInvoiceWithoutMetaData(boolean isFunction) throws SQLException {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ package org.springframework.oxm.jibx;
|
|||
import java.io.StringWriter;
|
||||
import javax.xml.transform.stream.StreamResult;
|
||||
|
||||
import org.junit.Assume;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
|
|
@ -28,6 +27,7 @@ import org.springframework.oxm.AbstractMarshallerTests;
|
|||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assume.assumeTrue;
|
||||
import static org.xmlunit.matchers.CompareMatcher.isSimilarTo;
|
||||
|
||||
/**
|
||||
|
|
@ -43,7 +43,7 @@ public class JibxMarshallerTests extends AbstractMarshallerTests<JibxMarshaller>
|
|||
@BeforeClass
|
||||
public static void compilerAssumptions() {
|
||||
// JiBX compiler is currently not compatible with JDK 9
|
||||
Assume.assumeTrue(System.getProperty("java.version").startsWith("1.8."));
|
||||
assumeTrue(System.getProperty("java.version").startsWith("1.8."));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ package org.springframework.oxm.jibx;
|
|||
import java.io.ByteArrayInputStream;
|
||||
import javax.xml.transform.stream.StreamSource;
|
||||
|
||||
import org.junit.Assume;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
|
|
@ -27,6 +26,7 @@ import org.springframework.oxm.AbstractUnmarshallerTests;
|
|||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assume.assumeTrue;
|
||||
|
||||
/**
|
||||
* NOTE: These tests fail under Eclipse/IDEA because JiBX binding does
|
||||
|
|
@ -46,7 +46,7 @@ public class JibxUnmarshallerTests extends AbstractUnmarshallerTests<JibxMarshal
|
|||
@BeforeClass
|
||||
public static void compilerAssumptions() {
|
||||
// JiBX compiler is currently not compatible with JDK 9
|
||||
Assume.assumeTrue(System.getProperty("java.version").startsWith("1.8."));
|
||||
assumeTrue(System.getProperty("java.version").startsWith("1.8."));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ import javax.servlet.http.HttpServletRequestWrapper;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.Part;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.http.MediaType;
|
||||
|
|
@ -46,6 +45,7 @@ import org.springframework.web.bind.annotation.RequestPart;
|
|||
import org.springframework.web.filter.OncePerRequestFilter;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.multipart;
|
||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.model;
|
||||
|
|
@ -275,7 +275,7 @@ public class MultipartControllerTests {
|
|||
|
||||
if (file != null && file.length > 0) {
|
||||
byte[] content = file[0].getBytes();
|
||||
Assert.assertArrayEquals(content, file[1].getBytes());
|
||||
assertArrayEquals(content, file[1].getBytes());
|
||||
model.addAttribute("fileContent", content);
|
||||
}
|
||||
if (json != null) {
|
||||
|
|
@ -291,7 +291,7 @@ public class MultipartControllerTests {
|
|||
|
||||
if (file != null && !file.isEmpty()) {
|
||||
byte[] content = file.get(0).getBytes();
|
||||
Assert.assertArrayEquals(content, file.get(1).getBytes());
|
||||
assertArrayEquals(content, file.get(1).getBytes());
|
||||
model.addAttribute("fileContent", content);
|
||||
}
|
||||
if (json != null) {
|
||||
|
|
@ -319,7 +319,7 @@ public class MultipartControllerTests {
|
|||
|
||||
if (file.isPresent()) {
|
||||
byte[] content = file.get()[0].getBytes();
|
||||
Assert.assertArrayEquals(content, file.get()[1].getBytes());
|
||||
assertArrayEquals(content, file.get()[1].getBytes());
|
||||
model.addAttribute("fileContent", content);
|
||||
}
|
||||
model.addAttribute("jsonContent", json);
|
||||
|
|
@ -333,7 +333,7 @@ public class MultipartControllerTests {
|
|||
|
||||
if (file.isPresent()) {
|
||||
byte[] content = file.get().get(0).getBytes();
|
||||
Assert.assertArrayEquals(content, file.get().get(1).getBytes());
|
||||
assertArrayEquals(content, file.get().get(1).getBytes());
|
||||
model.addAttribute("fileContent", content);
|
||||
}
|
||||
model.addAttribute("jsonContent", json);
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ import java.util.concurrent.ExecutionException;
|
|||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
|
|
@ -315,7 +314,7 @@ public class AsyncRestTemplateIntegrationTests extends AbstractMockWebServerTest
|
|||
@Test
|
||||
public void deleteCallbackWithLambdas() throws Exception {
|
||||
ListenableFuture<?> deletedFuture = template.delete(new URI(baseUrl + "/delete"));
|
||||
deletedFuture.addCallback(Assert::assertNull, ex -> fail(ex.getMessage()));
|
||||
deletedFuture.addCallback(result -> assertNull(result), ex -> fail(ex.getMessage()));
|
||||
waitTillDone(deletedFuture);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ import java.util.Optional;
|
|||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import io.netty.buffer.PooledByteBufAllocator;
|
||||
import io.netty.util.IllegalReferenceCountException;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import reactor.core.publisher.Flux;
|
||||
|
|
@ -67,6 +66,7 @@ import org.springframework.util.MultiValueMap;
|
|||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
import static org.springframework.http.codec.json.Jackson2CodecSupport.JSON_VIEW_HINT;
|
||||
|
||||
/**
|
||||
|
|
@ -436,7 +436,7 @@ public class BodyExtractorsTests {
|
|||
assertTrue(throwable instanceof UnsupportedMediaTypeException);
|
||||
try {
|
||||
buffer.release();
|
||||
Assert.fail("releasing the buffer should have failed");
|
||||
fail("releasing the buffer should have failed");
|
||||
}
|
||||
catch (IllegalReferenceCountException exc) {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ import java.util.Map;
|
|||
import java.util.Optional;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import reactor.core.publisher.Flux;
|
||||
|
|
@ -71,6 +70,7 @@ import static java.nio.charset.StandardCharsets.UTF_8;
|
|||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.springframework.http.codec.json.Jackson2CodecSupport.JSON_VIEW_HINT;
|
||||
|
||||
/**
|
||||
|
|
@ -127,7 +127,7 @@ public class BodyInsertersTests {
|
|||
StepVerifier.create(response.getBody())
|
||||
.consumeNextWith(buf -> {
|
||||
String actual = DataBufferTestUtils.dumpString(buf, UTF_8);
|
||||
Assert.assertEquals("foo", actual);
|
||||
assertEquals("foo", actual);
|
||||
})
|
||||
.expectComplete()
|
||||
.verify();
|
||||
|
|
@ -173,7 +173,7 @@ public class BodyInsertersTests {
|
|||
StepVerifier.create(response.getBody())
|
||||
.consumeNextWith(buf -> {
|
||||
String actual = DataBufferTestUtils.dumpString(buf, UTF_8);
|
||||
Assert.assertEquals("foo", actual);
|
||||
assertEquals("foo", actual);
|
||||
})
|
||||
.expectComplete()
|
||||
.verify();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-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.
|
||||
|
|
@ -18,7 +18,6 @@ package org.springframework.web.reactive.result.method.annotation;
|
|||
|
||||
import java.time.Duration;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import reactor.core.publisher.Flux;
|
||||
|
|
@ -36,6 +35,9 @@ import org.springframework.web.reactive.function.client.WebClient;
|
|||
import org.springframework.web.reactive.protobuf.Msg;
|
||||
import org.springframework.web.reactive.protobuf.SecondMsg;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
|
||||
/**
|
||||
* Integration tests for Protobuf support.
|
||||
*
|
||||
|
|
@ -71,9 +73,9 @@ public class ProtobufIntegrationTests extends AbstractRequestMappingIntegrationT
|
|||
.uri("/message")
|
||||
.exchange()
|
||||
.doOnNext(response -> {
|
||||
Assert.assertFalse(response.headers().contentType().get().getParameters().containsKey("delimited"));
|
||||
Assert.assertEquals("sample.proto", response.headers().header("X-Protobuf-Schema").get(0));
|
||||
Assert.assertEquals("Msg", response.headers().header("X-Protobuf-Message").get(0));
|
||||
assertFalse(response.headers().contentType().get().getParameters().containsKey("delimited"));
|
||||
assertEquals("sample.proto", response.headers().header("X-Protobuf-Schema").get(0));
|
||||
assertEquals("Msg", response.headers().header("X-Protobuf-Message").get(0));
|
||||
})
|
||||
.flatMap(response -> response.bodyToMono(Msg.class));
|
||||
|
||||
|
|
@ -88,9 +90,9 @@ public class ProtobufIntegrationTests extends AbstractRequestMappingIntegrationT
|
|||
.uri("/messages")
|
||||
.exchange()
|
||||
.doOnNext(response -> {
|
||||
Assert.assertEquals("true", response.headers().contentType().get().getParameters().get("delimited"));
|
||||
Assert.assertEquals("sample.proto", response.headers().header("X-Protobuf-Schema").get(0));
|
||||
Assert.assertEquals("Msg", response.headers().header("X-Protobuf-Message").get(0));
|
||||
assertEquals("true", response.headers().contentType().get().getParameters().get("delimited"));
|
||||
assertEquals("sample.proto", response.headers().header("X-Protobuf-Schema").get(0));
|
||||
assertEquals("Msg", response.headers().header("X-Protobuf-Message").get(0));
|
||||
})
|
||||
.flatMapMany(response -> response.bodyToFlux(Msg.class));
|
||||
|
||||
|
|
@ -107,9 +109,9 @@ public class ProtobufIntegrationTests extends AbstractRequestMappingIntegrationT
|
|||
.uri("/message-stream")
|
||||
.exchange()
|
||||
.doOnNext(response -> {
|
||||
Assert.assertEquals("true", response.headers().contentType().get().getParameters().get("delimited"));
|
||||
Assert.assertEquals("sample.proto", response.headers().header("X-Protobuf-Schema").get(0));
|
||||
Assert.assertEquals("Msg", response.headers().header("X-Protobuf-Message").get(0));
|
||||
assertEquals("true", response.headers().contentType().get().getParameters().get("delimited"));
|
||||
assertEquals("sample.proto", response.headers().header("X-Protobuf-Schema").get(0));
|
||||
assertEquals("Msg", response.headers().header("X-Protobuf-Message").get(0));
|
||||
})
|
||||
.flatMapMany(response -> response.bodyToFlux(Msg.class));
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ package org.springframework.web.reactive.result.method.annotation;
|
|||
import java.io.File;
|
||||
import java.time.Duration;
|
||||
|
||||
import org.junit.Assume;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
|
@ -136,7 +135,7 @@ public class SseIntegrationTests extends AbstractHttpHandlerIntegrationTests {
|
|||
@Test
|
||||
public void sseAsEvent() {
|
||||
|
||||
Assume.assumeTrue(server instanceof JettyHttpServer);
|
||||
assumeTrue(server instanceof JettyHttpServer);
|
||||
|
||||
Flux<ServerSentEvent<Person>> result = this.webClient.get()
|
||||
.uri("/event")
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-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,11 +16,12 @@
|
|||
|
||||
package org.springframework.web.reactive.result.view.script;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.beans.DirectFieldAccessor;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
/**
|
||||
* Unit tests for {@link ScriptTemplateViewResolver}.
|
||||
*
|
||||
|
|
@ -31,10 +32,10 @@ public class ScriptTemplateViewResolverTests {
|
|||
@Test
|
||||
public void viewClass() throws Exception {
|
||||
ScriptTemplateViewResolver resolver = new ScriptTemplateViewResolver();
|
||||
Assert.assertEquals(ScriptTemplateView.class, resolver.requiredViewClass());
|
||||
assertEquals(ScriptTemplateView.class, resolver.requiredViewClass());
|
||||
DirectFieldAccessor viewAccessor = new DirectFieldAccessor(resolver);
|
||||
Class<?> viewClass = (Class<?>) viewAccessor.getPropertyValue("viewClass");
|
||||
Assert.assertEquals(ScriptTemplateView.class, viewClass);
|
||||
assertEquals(ScriptTemplateView.class, viewClass);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ import org.eclipse.jetty.server.Server;
|
|||
import org.eclipse.jetty.servlet.ServletContextHandler;
|
||||
import org.eclipse.jetty.servlet.ServletHolder;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
|
@ -67,6 +66,7 @@ import org.springframework.web.servlet.DispatcherServlet;
|
|||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.springframework.web.bind.annotation.RequestMethod.POST;
|
||||
|
||||
|
|
@ -239,7 +239,7 @@ public class RequestPartIntegrationTests {
|
|||
@RequestPart(name = "empty-data", required = false) TestData emptyData,
|
||||
@RequestPart(name = "iso-8859-1-data") byte[] iso88591Data) {
|
||||
|
||||
Assert.assertArrayEquals(new byte[]{(byte) 0xC4}, iso88591Data);
|
||||
assertArrayEquals(new byte[]{(byte) 0xC4}, iso88591Data);
|
||||
|
||||
String url = "http://localhost:8080/test/" + testData.getName() + "/" + file.get().getOriginalFilename();
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-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.
|
||||
|
|
@ -18,11 +18,13 @@ package org.springframework.web.servlet.view.groovy;
|
|||
|
||||
import java.util.Locale;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.beans.DirectFieldAccessor;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
/**
|
||||
* Unit tests for
|
||||
* {@link org.springframework.web.servlet.view.groovy.GroovyMarkupViewResolver}.
|
||||
|
|
@ -34,18 +36,18 @@ public class GroovyMarkupViewResolverTests {
|
|||
@Test
|
||||
public void viewClass() throws Exception {
|
||||
GroovyMarkupViewResolver resolver = new GroovyMarkupViewResolver();
|
||||
Assert.assertEquals(GroovyMarkupView.class, resolver.requiredViewClass());
|
||||
assertEquals(GroovyMarkupView.class, resolver.requiredViewClass());
|
||||
DirectFieldAccessor viewAccessor = new DirectFieldAccessor(resolver);
|
||||
Class<?> viewClass = (Class<?>) viewAccessor.getPropertyValue("viewClass");
|
||||
Assert.assertEquals(GroovyMarkupView.class, viewClass);
|
||||
assertEquals(GroovyMarkupView.class, viewClass);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void cacheKey() throws Exception {
|
||||
GroovyMarkupViewResolver resolver = new GroovyMarkupViewResolver();
|
||||
String cacheKey = (String) resolver.getCacheKey("test", Locale.US);
|
||||
Assert.assertNotNull(cacheKey);
|
||||
Assert.assertEquals("test_en_US", cacheKey);
|
||||
assertNotNull(cacheKey);
|
||||
assertEquals("test_en_US", cacheKey);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-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,11 +16,12 @@
|
|||
|
||||
package org.springframework.web.servlet.view.script;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.beans.DirectFieldAccessor;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
/**
|
||||
* Unit tests for {@link ScriptTemplateViewResolver}.
|
||||
*
|
||||
|
|
@ -31,10 +32,10 @@ public class ScriptTemplateViewResolverTests {
|
|||
@Test
|
||||
public void viewClass() throws Exception {
|
||||
ScriptTemplateViewResolver resolver = new ScriptTemplateViewResolver();
|
||||
Assert.assertEquals(ScriptTemplateView.class, resolver.requiredViewClass());
|
||||
assertEquals(ScriptTemplateView.class, resolver.requiredViewClass());
|
||||
DirectFieldAccessor viewAccessor = new DirectFieldAccessor(resolver);
|
||||
Class<?> viewClass = (Class<?>) viewAccessor.getPropertyValue("viewClass");
|
||||
Assert.assertEquals(ScriptTemplateView.class, viewClass);
|
||||
assertEquals(ScriptTemplateView.class, viewClass);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@
|
|||
<module name="com.puppycrawl.tools.checkstyle.checks.imports.IllegalImportCheck">
|
||||
<property name="regexp" value="true" />
|
||||
<property name="illegalClasses"
|
||||
value="^reactor\.core\.support\.Assert,^junit\.framework\..+,^org\.junit\.Assert\.assertThat,^org\.junit\.Assume\.assumeThat,^org\.junit\.rules\.ExpectedException,^org\.slf4j\.LoggerFactory" />
|
||||
value="^reactor\.core\.support\.Assert,^junit\.framework\..+,^org\.junit\.Assert$,^org\.junit\.Assume$,^org\.junit\.Assert\.assertThat,^org\.junit\.Assume\.assumeThat,^org\.junit\.rules\.ExpectedException,^org\.slf4j\.LoggerFactory" />
|
||||
</module>
|
||||
|
||||
<!-- Javadoc Comments -->
|
||||
|
|
|
|||
Loading…
Reference in New Issue