Unable ImportOrder Checkstyle rule for tests

* Fix wrong import order in tests
* Polishing for not closed application contexts
* Use diamonds
* Use proper assertion operators
* Remove redundant classes
* Improve performance in JPA tests
* Fix typos
This commit is contained in:
Artem Bilan
2018-11-07 15:32:30 -05:00
parent 76c670075b
commit 648aeb8e96
110 changed files with 1540 additions and 1137 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2018 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.
@@ -25,19 +25,26 @@ import java.io.OutputStream;
import org.junit.After;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.core.serializer.DefaultDeserializer;
import org.springframework.core.serializer.DefaultSerializer;
import org.springframework.core.serializer.Deserializer;
import org.springframework.core.serializer.Serializer;
import org.springframework.messaging.Message;
import org.springframework.integration.jdbc.store.JdbcMessageStore;
import org.springframework.integration.store.MessageStore;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.integration.test.util.TestUtils;
import org.springframework.jdbc.support.lob.LobHandler;
import org.springframework.messaging.Message;
import org.springframework.test.util.ReflectionTestUtils;
/**
* @author Mark Fisher
* @author Dave Syer
* @author Gunnar Hillert
* @author Artem Bilan
*/
public class JdbcMessageStoreParserTests {
private ClassPathXmlApplicationContext context;
@@ -103,6 +110,7 @@ public class JdbcMessageStoreParserTests {
message = MessageBuilder.fromMessage(message).setHeader("serializer", "CUSTOM").build();
targetSerializer.serialize(message, outputStream);
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2017 the original author or authors.
* Copyright 2017-2018 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.
@@ -24,6 +24,7 @@ import javax.sql.DataSource;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
@@ -32,6 +33,8 @@ import org.springframework.transaction.annotation.Transactional;
/**
* @author Bojan Vukasovic
* @author Artem Bilan
*
* @since 5.0
*/
@ContextConfiguration
@@ -47,7 +50,7 @@ public class JdbcMetadataStoreTests {
private JdbcMetadataStore metadataStore;
@Before
public void init() throws Exception {
public void init() {
metadataStore = new JdbcMetadataStore(dataSource);
metadataStore.afterPropertiesSet();
}