From 02be7eb478550e8d26e8b45be376572ccbf4a35e Mon Sep 17 00:00:00 2001 From: Janne Valkealahti Date: Sat, 29 Jun 2019 15:49:48 +0100 Subject: [PATCH] Polish --- .../statemachine/transition/DefaultLocalTransition.java | 1 - .../statemachine/config/ConfigurationErrorTests.java | 4 +--- .../statemachine/config/SessionScopedAnnotationTests.java | 1 - .../statemachine/config/SessionScopedManualTests.java | 1 - .../annotation/MixedAnnotationConfigurationTests.java | 3 +-- .../annotation/SimpleAnnotationConfiguration2Tests.java | 7 +++---- .../annotation/SimpleAnnotationConfigurationTests.java | 7 +++---- .../common/annotation/XmlImportDependenciesTests.java | 3 +-- .../support/StateContextExpressionMethodsTests.java | 1 - .../demo/datajpamultipersist/DataJpaMultiPersistTests.java | 1 - .../test/java/demo/datapersist/DataJpaPersistTests.java | 3 +-- .../deploy/src/test/java/demo/deploy/DeployTests.java | 3 +-- .../src/test/java/demo/deploy/StateMachineTests.java | 1 - .../src/test/java/demo/eventservice/EventServiceTests.java | 3 +-- .../src/test/java/demo/monitoring/MonitoringTests.java | 3 +-- 15 files changed, 13 insertions(+), 29 deletions(-) diff --git a/spring-statemachine-core/src/main/java/org/springframework/statemachine/transition/DefaultLocalTransition.java b/spring-statemachine-core/src/main/java/org/springframework/statemachine/transition/DefaultLocalTransition.java index 2b455be6..8feaa8de 100644 --- a/spring-statemachine-core/src/main/java/org/springframework/statemachine/transition/DefaultLocalTransition.java +++ b/spring-statemachine-core/src/main/java/org/springframework/statemachine/transition/DefaultLocalTransition.java @@ -19,7 +19,6 @@ import java.util.Collection; import java.util.function.Function; import org.springframework.statemachine.StateContext; -import org.springframework.statemachine.guard.Guard; import org.springframework.statemachine.security.SecurityRule; import org.springframework.statemachine.state.State; import org.springframework.statemachine.trigger.Trigger; diff --git a/spring-statemachine-core/src/test/java/org/springframework/statemachine/config/ConfigurationErrorTests.java b/spring-statemachine-core/src/test/java/org/springframework/statemachine/config/ConfigurationErrorTests.java index 1f98606a..38d9ccef 100644 --- a/spring-statemachine-core/src/test/java/org/springframework/statemachine/config/ConfigurationErrorTests.java +++ b/spring-statemachine-core/src/test/java/org/springframework/statemachine/config/ConfigurationErrorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 the original author or authors. + * Copyright 2016-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. @@ -17,14 +17,12 @@ package org.springframework.statemachine.config; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.isA; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import org.hamcrest.Matcher; import org.junit.jupiter.api.Test; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Configuration; diff --git a/spring-statemachine-core/src/test/java/org/springframework/statemachine/config/SessionScopedAnnotationTests.java b/spring-statemachine-core/src/test/java/org/springframework/statemachine/config/SessionScopedAnnotationTests.java index d4ac9a51..fec6794f 100644 --- a/spring-statemachine-core/src/test/java/org/springframework/statemachine/config/SessionScopedAnnotationTests.java +++ b/spring-statemachine-core/src/test/java/org/springframework/statemachine/config/SessionScopedAnnotationTests.java @@ -46,7 +46,6 @@ import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.annotation.DirtiesContext.MethodMode; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; diff --git a/spring-statemachine-core/src/test/java/org/springframework/statemachine/config/SessionScopedManualTests.java b/spring-statemachine-core/src/test/java/org/springframework/statemachine/config/SessionScopedManualTests.java index 746e3fe3..183189bd 100644 --- a/spring-statemachine-core/src/test/java/org/springframework/statemachine/config/SessionScopedManualTests.java +++ b/spring-statemachine-core/src/test/java/org/springframework/statemachine/config/SessionScopedManualTests.java @@ -45,7 +45,6 @@ import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.annotation.DirtiesContext.MethodMode; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; diff --git a/spring-statemachine-core/src/test/java/org/springframework/statemachine/config/common/annotation/MixedAnnotationConfigurationTests.java b/spring-statemachine-core/src/test/java/org/springframework/statemachine/config/common/annotation/MixedAnnotationConfigurationTests.java index 4d05fa16..aec8d308 100644 --- a/spring-statemachine-core/src/test/java/org/springframework/statemachine/config/common/annotation/MixedAnnotationConfigurationTests.java +++ b/spring-statemachine-core/src/test/java/org/springframework/statemachine/config/common/annotation/MixedAnnotationConfigurationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 the original author or authors. + * Copyright 2015-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. @@ -36,7 +36,6 @@ import org.springframework.statemachine.config.common.annotation.simple.SimpleTe import org.springframework.statemachine.config.common.annotation.simple.SimpleTestConfigurerAdapter; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.support.AnnotationConfigContextLoader; @ExtendWith(SpringExtension.class) diff --git a/spring-statemachine-core/src/test/java/org/springframework/statemachine/config/common/annotation/SimpleAnnotationConfiguration2Tests.java b/spring-statemachine-core/src/test/java/org/springframework/statemachine/config/common/annotation/SimpleAnnotationConfiguration2Tests.java index c3069758..483c58a9 100644 --- a/spring-statemachine-core/src/test/java/org/springframework/statemachine/config/common/annotation/SimpleAnnotationConfiguration2Tests.java +++ b/spring-statemachine-core/src/test/java/org/springframework/statemachine/config/common/annotation/SimpleAnnotationConfiguration2Tests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 the original author or authors. + * Copyright 2015-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. @@ -37,7 +37,6 @@ import org.springframework.statemachine.config.common.annotation.simple.SimpleTe import org.springframework.statemachine.config.common.annotation.simple.SimpleTestConfigurerAdapter; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.support.AnnotationConfigContextLoader; /** @@ -86,7 +85,7 @@ public class SimpleAnnotationConfiguration2Tests { // assertThat(beanB.dataB, is("simpleDataB")); // assertThat(beanB.dataBB, is("simpleDataBB")); } - + @Configuration @EnableSimpleTest2 static class Config extends SimpleTestConfigurerAdapter { @@ -117,5 +116,5 @@ public class SimpleAnnotationConfiguration2Tests { } } - + } diff --git a/spring-statemachine-core/src/test/java/org/springframework/statemachine/config/common/annotation/SimpleAnnotationConfigurationTests.java b/spring-statemachine-core/src/test/java/org/springframework/statemachine/config/common/annotation/SimpleAnnotationConfigurationTests.java index acf407e9..8dcd9e0f 100644 --- a/spring-statemachine-core/src/test/java/org/springframework/statemachine/config/common/annotation/SimpleAnnotationConfigurationTests.java +++ b/spring-statemachine-core/src/test/java/org/springframework/statemachine/config/common/annotation/SimpleAnnotationConfigurationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 the original author or authors. + * Copyright 2015-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. @@ -38,7 +38,6 @@ import org.springframework.statemachine.config.common.annotation.simple.SimpleTe import org.springframework.statemachine.config.common.annotation.simple.SimpleTestConfigurerAdapter; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.support.AnnotationConfigContextLoader; /** @@ -87,7 +86,7 @@ public class SimpleAnnotationConfigurationTests { assertThat(beanB.dataB, is("simpleDataB")); assertThat(beanB.dataBB, is("simpleDataBB")); } - + @Configuration @EnableSimpleTest static class Config extends SimpleTestConfigurerAdapter { @@ -118,5 +117,5 @@ public class SimpleAnnotationConfigurationTests { } } - + } diff --git a/spring-statemachine-core/src/test/java/org/springframework/statemachine/config/common/annotation/XmlImportDependenciesTests.java b/spring-statemachine-core/src/test/java/org/springframework/statemachine/config/common/annotation/XmlImportDependenciesTests.java index 91ca4aad..aaa23268 100644 --- a/spring-statemachine-core/src/test/java/org/springframework/statemachine/config/common/annotation/XmlImportDependenciesTests.java +++ b/spring-statemachine-core/src/test/java/org/springframework/statemachine/config/common/annotation/XmlImportDependenciesTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 the original author or authors. + * Copyright 2015-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. @@ -33,7 +33,6 @@ import org.springframework.statemachine.config.common.annotation.simple.SimpleTe import org.springframework.statemachine.config.common.annotation.simple.SimpleTestConfigurerAdapter; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.support.AnnotationConfigContextLoader; /** diff --git a/spring-statemachine-core/src/test/java/org/springframework/statemachine/support/StateContextExpressionMethodsTests.java b/spring-statemachine-core/src/test/java/org/springframework/statemachine/support/StateContextExpressionMethodsTests.java index 4f8fec76..96f37ef8 100644 --- a/spring-statemachine-core/src/test/java/org/springframework/statemachine/support/StateContextExpressionMethodsTests.java +++ b/spring-statemachine-core/src/test/java/org/springframework/statemachine/support/StateContextExpressionMethodsTests.java @@ -38,7 +38,6 @@ import org.springframework.statemachine.StateMachine; import org.springframework.statemachine.StateMachineEventResult; import org.springframework.statemachine.access.StateMachineAccessor; import org.springframework.statemachine.action.ActionListener; -import org.springframework.statemachine.guard.Guard; import org.springframework.statemachine.listener.StateMachineListener; import org.springframework.statemachine.security.SecurityRule; import org.springframework.statemachine.state.EnumState; diff --git a/spring-statemachine-samples/datajpamultipersist/src/test/java/demo/datajpamultipersist/DataJpaMultiPersistTests.java b/spring-statemachine-samples/datajpamultipersist/src/test/java/demo/datajpamultipersist/DataJpaMultiPersistTests.java index 7f6c4ef1..53f41e68 100644 --- a/spring-statemachine-samples/datajpamultipersist/src/test/java/demo/datajpamultipersist/DataJpaMultiPersistTests.java +++ b/spring-statemachine-samples/datajpamultipersist/src/test/java/demo/datajpamultipersist/DataJpaMultiPersistTests.java @@ -24,7 +24,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.junit.jupiter.api.extension.Extension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.annotation.DirtiesContext; diff --git a/spring-statemachine-samples/datapersist/src/test/java/demo/datapersist/DataJpaPersistTests.java b/spring-statemachine-samples/datapersist/src/test/java/demo/datapersist/DataJpaPersistTests.java index 927beb54..c3a60ddf 100644 --- a/spring-statemachine-samples/datapersist/src/test/java/demo/datapersist/DataJpaPersistTests.java +++ b/spring-statemachine-samples/datapersist/src/test/java/demo/datapersist/DataJpaPersistTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 the original author or authors. + * Copyright 2017-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. @@ -24,7 +24,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.junit.jupiter.api.extension.Extension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.annotation.DirtiesContext; diff --git a/spring-statemachine-samples/deploy/src/test/java/demo/deploy/DeployTests.java b/spring-statemachine-samples/deploy/src/test/java/demo/deploy/DeployTests.java index 2be05922..41044fe3 100644 --- a/spring-statemachine-samples/deploy/src/test/java/demo/deploy/DeployTests.java +++ b/spring-statemachine-samples/deploy/src/test/java/demo/deploy/DeployTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 the original author or authors. + * Copyright 2016-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. @@ -23,7 +23,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.junit.jupiter.api.extension.Extension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.annotation.DirtiesContext; diff --git a/spring-statemachine-samples/deploy/src/test/java/demo/deploy/StateMachineTests.java b/spring-statemachine-samples/deploy/src/test/java/demo/deploy/StateMachineTests.java index 9eb45507..bc3e42e1 100644 --- a/spring-statemachine-samples/deploy/src/test/java/demo/deploy/StateMachineTests.java +++ b/spring-statemachine-samples/deploy/src/test/java/demo/deploy/StateMachineTests.java @@ -17,7 +17,6 @@ package demo.deploy; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.junit.jupiter.api.extension.Extension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.messaging.Message; diff --git a/spring-statemachine-samples/eventservice/src/test/java/demo/eventservice/EventServiceTests.java b/spring-statemachine-samples/eventservice/src/test/java/demo/eventservice/EventServiceTests.java index 21c45ba2..ea4feea2 100644 --- a/spring-statemachine-samples/eventservice/src/test/java/demo/eventservice/EventServiceTests.java +++ b/spring-statemachine-samples/eventservice/src/test/java/demo/eventservice/EventServiceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 the original author or authors. + * Copyright 2016-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. @@ -26,7 +26,6 @@ import java.util.HashMap; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.junit.jupiter.api.extension.Extension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.context.annotation.Bean; diff --git a/spring-statemachine-samples/monitoring/src/test/java/demo/monitoring/MonitoringTests.java b/spring-statemachine-samples/monitoring/src/test/java/demo/monitoring/MonitoringTests.java index 84b3cc8d..066b230d 100644 --- a/spring-statemachine-samples/monitoring/src/test/java/demo/monitoring/MonitoringTests.java +++ b/spring-statemachine-samples/monitoring/src/test/java/demo/monitoring/MonitoringTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2018 the original author or authors. + * Copyright 2016-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. @@ -30,7 +30,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.junit.jupiter.api.extension.Extension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.annotation.DirtiesContext;