From 56038076117211925082fca55d58e84ea416367e Mon Sep 17 00:00:00 2001 From: Damian Szczepanik Date: Mon, 1 Jan 2024 09:58:28 +0100 Subject: [PATCH] Solves smell code: JUnit5 test classes and methods should have default package visibility --- pom.xml | 2 +- .../java/pl/szczepanik/silencio/GenericTest.java | 2 +- .../pl/szczepanik/silencio/api/FormatTest.java | 16 ++++++++-------- .../silencio/converters/BlankTest.java | 2 +- .../converters/NumberSequenceConverterTest.java | 10 +++++----- .../silencio/converters/StringConverterTest.java | 2 +- .../converters/WikipediaConverterTest.java | 6 +++--- .../silencio/core/AbstractProcessorTest.java | 10 +++++----- .../pl/szczepanik/silencio/core/BuilderTest.java | 16 ++++++++-------- .../silencio/core/BuilderTest_buildTest.java | 2 +- .../silencio/core/ConfigurationTest.java | 4 ++-- .../szczepanik/silencio/core/ExecutionTest.java | 10 +++++----- .../silencio/core/IntegrityExceptionTest.java | 4 ++-- .../pl/szczepanik/silencio/core/KeyTest.java | 4 ++-- .../silencio/core/ProcessorExceptionTest.java | 4 ++-- .../silencio/core/ProcessorStateMachineTest.java | 10 +++++----- .../pl/szczepanik/silencio/core/ValueTest.java | 4 ++-- .../silencio/decisions/MatcherDecisionTest.java | 6 +++--- .../silencio/decisions/NegativeDecisionTest.java | 2 +- .../silencio/decisions/PositiveDecisionTest.java | 2 +- .../diagnostics/BlankCharConverterTest.java | 2 +- .../diagnostics/ConstantValueConverterTest.java | 2 +- .../diagnostics/KeyValueConverterTest.java | 2 +- .../diagnostics/PassedValueConverterTest.java | 2 +- .../diagnostics/ProcessorSmokeCheckerTest.java | 4 ++-- .../BlankConverterIntegrationTest.java | 5 +++-- .../integration/BuilderIntegrationTest.java | 5 +++-- .../integration/EmptyContentIntegrationTest.java | 2 +- .../JSONProcessorIntegrationTest.java | 5 +++-- .../PropertiesProcessorIntegrationTest.java | 5 +++-- .../silencio/integration/SuvIntegrationTest.java | 2 +- .../WikipediaConverterIntegrationTest.java | 5 +++-- .../integration/XMLProcessorIntegrationTest.java | 5 +++-- .../processors/JSONParser_isBasicTypeTest.java | 2 +- .../silencio/processors/JSONProcessorTest.java | 8 ++++---- .../processors/PropertiesProcessorTest.java | 12 ++++++------ .../silencio/processors/XMLProcessorTest.java | 8 ++++---- .../silencio/processors/YAMLProcessorTest.java | 8 ++++---- .../processors/visitors/AbstractVisitorTest.java | 2 +- .../AbstractVisitor_processValueTest.java | 4 ++-- .../processors/visitors/JSONVisitorTest.java | 4 ++-- .../visitors/PropertiesVisitorTest.java | 2 +- .../processors/visitors/XMLVisitorTest.java | 6 +++--- .../processors/visitors/YAMLVisitorTest.java | 4 ++-- .../szczepanik/silencio/utils/IOUtilityTest.java | 12 ++++++------ 45 files changed, 121 insertions(+), 115 deletions(-) diff --git a/pom.xml b/pom.xml index cadb7f4..912490b 100644 --- a/pom.xml +++ b/pom.xml @@ -149,7 +149,7 @@ org.jacoco jacoco-maven-plugin - 0.8.6 + 0.8.11 diff --git a/src/test/java/pl/szczepanik/silencio/GenericTest.java b/src/test/java/pl/szczepanik/silencio/GenericTest.java index e367534..8829679 100644 --- a/src/test/java/pl/szczepanik/silencio/GenericTest.java +++ b/src/test/java/pl/szczepanik/silencio/GenericTest.java @@ -15,7 +15,7 @@ public abstract class GenericTest { protected Reader input; @AfterEach - public void closeStreams() throws IOException { + void closeStreams() throws IOException { if (input != null) { input.close(); } diff --git a/src/test/java/pl/szczepanik/silencio/api/FormatTest.java b/src/test/java/pl/szczepanik/silencio/api/FormatTest.java index 0ccc59f..7f993b0 100644 --- a/src/test/java/pl/szczepanik/silencio/api/FormatTest.java +++ b/src/test/java/pl/szczepanik/silencio/api/FormatTest.java @@ -15,7 +15,7 @@ public class FormatTest extends GenericTest { @Test - public void shouldReturnFormatName() { + void shouldReturnFormatName() { // given String formatName = "sunnyFormat"; @@ -28,7 +28,7 @@ public void shouldReturnFormatName() { } @Test - public void shouldNotAllowForEmptyName() { + void shouldNotAllowForEmptyName() { // when String emptyName = StringUtils.EMPTY; @@ -40,7 +40,7 @@ public void shouldNotAllowForEmptyName() { } @Test - public void shouldEqualsWhenNameIsEqual() { + void shouldEqualsWhenNameIsEqual() { // given Format one = new StubFormat("one"); @@ -54,7 +54,7 @@ public void shouldEqualsWhenNameIsEqual() { } @Test - public void shouldNotEqualsWhenNameIsNotEqual() { + void shouldNotEqualsWhenNameIsNotEqual() { // given Format one = new StubFormat("one"); @@ -68,7 +68,7 @@ public void shouldNotEqualsWhenNameIsNotEqual() { } @Test - public void shouldEqualsWithAnyObject() { + void shouldEqualsWithAnyObject() { // when Format one = Format.JSON; @@ -79,7 +79,7 @@ public void shouldEqualsWithAnyObject() { } @Test - public void shouldNotEqualsWithNull() { + void shouldNotEqualsWithNull() { // when Format one = Format.JSON; @@ -92,7 +92,7 @@ public void shouldNotEqualsWithNull() { } @Test - public void shouldReturnHashCodeOfName() { + void shouldReturnHashCodeOfName() { // given String name = "crazyName"; @@ -105,7 +105,7 @@ public void shouldReturnHashCodeOfName() { } @Test - public void shouldReturnValidFormat() { + void shouldReturnValidFormat() { // given String formatName = "some, some, some"; diff --git a/src/test/java/pl/szczepanik/silencio/converters/BlankTest.java b/src/test/java/pl/szczepanik/silencio/converters/BlankTest.java index 58eecb6..c451d6f 100644 --- a/src/test/java/pl/szczepanik/silencio/converters/BlankTest.java +++ b/src/test/java/pl/szczepanik/silencio/converters/BlankTest.java @@ -15,7 +15,7 @@ public class BlankTest extends GenericTest { @Test - public void shouldReturnEmptyValue() { + void shouldReturnEmptyValue() { // given Converter blank = new BlankConverter(); diff --git a/src/test/java/pl/szczepanik/silencio/converters/NumberSequenceConverterTest.java b/src/test/java/pl/szczepanik/silencio/converters/NumberSequenceConverterTest.java index 6a98298..95d9b16 100644 --- a/src/test/java/pl/szczepanik/silencio/converters/NumberSequenceConverterTest.java +++ b/src/test/java/pl/szczepanik/silencio/converters/NumberSequenceConverterTest.java @@ -18,7 +18,7 @@ public class NumberSequenceConverterTest extends GenericTest { @Test - public void shouldReturnValueWhenPassingNull() { + void shouldReturnValueWhenPassingNull() { // given Converter blank = new NumberSequenceConverter(); @@ -33,7 +33,7 @@ public void shouldReturnValueWhenPassingNull() { } @Test - public void shouldReturnSameNumbersWhenPassingEqualsValues() { + void shouldReturnSameNumbersWhenPassingEqualsValues() { // given having 2 values with the same value (compareTo returns true) but different reference Converter blank = new NumberSequenceConverter(); @@ -53,7 +53,7 @@ public void shouldReturnSameNumbersWhenPassingEqualsValues() { } @Test - public void shouldReturnDifferentNumberWhenPassingDifferentValue() { + void shouldReturnDifferentNumberWhenPassingDifferentValue() { Converter blank = new NumberSequenceConverter(); Key key = new Key("funnyKey"); @@ -72,7 +72,7 @@ public void shouldReturnDifferentNumberWhenPassingDifferentValue() { } @Test - public void shouldReturnSameNumberWhenPassingSameReference() { + void shouldReturnSameNumberWhenPassingSameReference() { // given Converter blank = new NumberSequenceConverter(); @@ -90,7 +90,7 @@ public void shouldReturnSameNumberWhenPassingSameReference() { } @Test - public void shouldClearHistoryOnInit() { + void shouldClearHistoryOnInit() { // given Converter blank = new NumberSequenceConverter(); diff --git a/src/test/java/pl/szczepanik/silencio/converters/StringConverterTest.java b/src/test/java/pl/szczepanik/silencio/converters/StringConverterTest.java index 2caebac..74801c1 100644 --- a/src/test/java/pl/szczepanik/silencio/converters/StringConverterTest.java +++ b/src/test/java/pl/szczepanik/silencio/converters/StringConverterTest.java @@ -15,7 +15,7 @@ public class StringConverterTest extends GenericTest { @Test - public void shouldReturnEmptyValue() { + void shouldReturnEmptyValue() { // given String pattern = "constant"; diff --git a/src/test/java/pl/szczepanik/silencio/converters/WikipediaConverterTest.java b/src/test/java/pl/szczepanik/silencio/converters/WikipediaConverterTest.java index 59fdce9..80e7309 100644 --- a/src/test/java/pl/szczepanik/silencio/converters/WikipediaConverterTest.java +++ b/src/test/java/pl/szczepanik/silencio/converters/WikipediaConverterTest.java @@ -37,7 +37,7 @@ public class WikipediaConverterTest extends GenericTest { private static final String INVALID_HTML_PAGE = "This does not look like valid HTML page"; @Test - public void shouldFailWhenServerReturnsInvalidPage() throws IOException { + void shouldFailWhenServerReturnsInvalidPage() throws IOException { // given Converter wikipedia = new WikipediaConverter(); @@ -62,7 +62,7 @@ public void shouldFailWhenServerReturnsInvalidPage() throws IOException { } @Test - public void shouldConvertWholeFile() throws IOException { + void shouldConvertWholeFile() throws IOException { // given Converter converter = new WikipediaConverter(); @@ -106,7 +106,7 @@ public void shouldConvertWholeFile() throws IOException { } @Test - public void shouldClearHistoryOnInit() { + void shouldClearHistoryOnInit() { // given Converter blank = new WikipediaConverter(); diff --git a/src/test/java/pl/szczepanik/silencio/core/AbstractProcessorTest.java b/src/test/java/pl/szczepanik/silencio/core/AbstractProcessorTest.java index e547dcb..a89c406 100644 --- a/src/test/java/pl/szczepanik/silencio/core/AbstractProcessorTest.java +++ b/src/test/java/pl/szczepanik/silencio/core/AbstractProcessorTest.java @@ -17,7 +17,7 @@ public class AbstractProcessorTest extends GenericTest { @Test - public void shouldReturnPassedFormat() { + void shouldReturnPassedFormat() { // given Converter[] converters = { new StubConverter() }; @@ -31,7 +31,7 @@ public void shouldReturnPassedFormat() { } @Test - public void shouldFailWhenBuildFromEmptyFormat() { + void shouldFailWhenBuildFromEmptyFormat() { // given Converter[] converters = { new StubConverter() }; @@ -46,7 +46,7 @@ public void shouldFailWhenBuildFromEmptyFormat() { } @Test - public void shouldFailWhenBuildFromNullConfiguration() { + void shouldFailWhenBuildFromNullConfiguration() { // given Format format = Format.PROPERTIES; @@ -59,7 +59,7 @@ public void shouldFailWhenBuildFromNullConfiguration() { } @Test - public void shouldFailWhenBuildFromEmptyConverter() { + void shouldFailWhenBuildFromEmptyConverter() { // given Format format = Format.PROPERTIES; @@ -72,7 +72,7 @@ public void shouldFailWhenBuildFromEmptyConverter() { } @Test - public void shouldFailOnProcessWhenConvertersAreNotSet() { + void shouldFailOnProcessWhenConvertersAreNotSet() { // given Format format = Format.PROPERTIES; diff --git a/src/test/java/pl/szczepanik/silencio/core/BuilderTest.java b/src/test/java/pl/szczepanik/silencio/core/BuilderTest.java index 001f97b..0ec1811 100644 --- a/src/test/java/pl/szczepanik/silencio/core/BuilderTest.java +++ b/src/test/java/pl/szczepanik/silencio/core/BuilderTest.java @@ -24,7 +24,7 @@ public class BuilderTest extends GenericTest { @Test - public void shouldHoldPassedFormat() { + void shouldHoldPassedFormat() { // given Format format = new StubFormat("builderFormat"); @@ -38,7 +38,7 @@ public void shouldHoldPassedFormat() { } @Test - public void shouldAppendPassedValues_NxN() { + void shouldAppendPassedValues_NxN() { // given Format format = Format.JSON; @@ -57,7 +57,7 @@ public void shouldAppendPassedValues_NxN() { } @Test - public void shouldAppendPassedValues_1xN() { + void shouldAppendPassedValues_1xN() { // given Format format = Format.JSON; @@ -76,7 +76,7 @@ public void shouldAppendPassedValues_1xN() { } @Test - public void shouldAppendPassedValues_1x1() { + void shouldAppendPassedValues_1x1() { // given Format format = Format.JSON; @@ -99,7 +99,7 @@ public void shouldAppendPassedValues_1x1() { } @Test - public void shouldAppendPassedValues_0xN() { + void shouldAppendPassedValues_0xN() { // given Format format = Format.JSON; @@ -118,7 +118,7 @@ public void shouldAppendPassedValues_0xN() { } @Test - public void shouldAppendPassedValues_0x1() { + void shouldAppendPassedValues_0x1() { // given Format format = Format.JSON; @@ -137,7 +137,7 @@ public void shouldAppendPassedValues_0x1() { } @Test - public void shouldFailWhenPassingInvalidFormat() { + void shouldFailWhenPassingInvalidFormat() { // when Format format = new StubFormat("tr!cky"); @@ -152,7 +152,7 @@ public void shouldFailWhenPassingInvalidFormat() { } @Test - public void shouldClearExecutions() { + void shouldClearExecutions() { // given Builder builder = new Builder(Format.XML); diff --git a/src/test/java/pl/szczepanik/silencio/core/BuilderTest_buildTest.java b/src/test/java/pl/szczepanik/silencio/core/BuilderTest_buildTest.java index baa5c7a..3da6dc7 100644 --- a/src/test/java/pl/szczepanik/silencio/core/BuilderTest_buildTest.java +++ b/src/test/java/pl/szczepanik/silencio/core/BuilderTest_buildTest.java @@ -27,7 +27,7 @@ public static Collection data() { @MethodSource("data") @ParameterizedTest(name = "\"{0}\"") - public void buildSupportsAllFormats(Format format) { + void buildSupportsAllFormats(Format format) { initDataWithNameTest(format); // given diff --git a/src/test/java/pl/szczepanik/silencio/core/ConfigurationTest.java b/src/test/java/pl/szczepanik/silencio/core/ConfigurationTest.java index 96375b5..e0890d0 100644 --- a/src/test/java/pl/szczepanik/silencio/core/ConfigurationTest.java +++ b/src/test/java/pl/szczepanik/silencio/core/ConfigurationTest.java @@ -14,7 +14,7 @@ public class ConfigurationTest extends GenericTest { @Test - public void shouldReturnPassedExecutions() { + void shouldReturnPassedExecutions() { // given Execution[] executions = { new Execution(new PositiveDecision(), new StubConverter()) }; @@ -27,7 +27,7 @@ public void shouldReturnPassedExecutions() { } @Test - public void shouldFailWhenPassingEmtptyExecution() { + void shouldFailWhenPassingEmtptyExecution() { // given Execution[] executors = {}; diff --git a/src/test/java/pl/szczepanik/silencio/core/ExecutionTest.java b/src/test/java/pl/szczepanik/silencio/core/ExecutionTest.java index 5fb3f3f..e1250fb 100644 --- a/src/test/java/pl/szczepanik/silencio/core/ExecutionTest.java +++ b/src/test/java/pl/szczepanik/silencio/core/ExecutionTest.java @@ -17,7 +17,7 @@ public class ExecutionTest extends GenericTest { @Test - public void shouldReturnPassedValues() { + void shouldReturnPassedValues() { // given Decision[] decisions = { new PositiveDecision() }; @@ -32,7 +32,7 @@ public void shouldReturnPassedValues() { } @Test - public void shouldFailWhenPassingEmtptyDecisions() { + void shouldFailWhenPassingEmtptyDecisions() { // given Decision[] decisions = {}; @@ -45,7 +45,7 @@ public void shouldFailWhenPassingEmtptyDecisions() { } @Test - public void shouldFailWhenPassingNullDecisions() { + void shouldFailWhenPassingNullDecisions() { // given Decision[] decisions = { null }; @@ -58,7 +58,7 @@ public void shouldFailWhenPassingNullDecisions() { } @Test - public void shouldFailWhenPassingEmtptyConverter() { + void shouldFailWhenPassingEmtptyConverter() { // given Decision[] decisions = { new PositiveDecision() }; @@ -71,7 +71,7 @@ public void shouldFailWhenPassingEmtptyConverter() { } @Test - public void shouldFailWhenPassingNullConverter() { + void shouldFailWhenPassingNullConverter() { // given Decision[] decisions = { new PositiveDecision() }; diff --git a/src/test/java/pl/szczepanik/silencio/core/IntegrityExceptionTest.java b/src/test/java/pl/szczepanik/silencio/core/IntegrityExceptionTest.java index e61c619..8bb8ea8 100644 --- a/src/test/java/pl/szczepanik/silencio/core/IntegrityExceptionTest.java +++ b/src/test/java/pl/szczepanik/silencio/core/IntegrityExceptionTest.java @@ -11,7 +11,7 @@ public class IntegrityExceptionTest extends GenericTest { @Test - public void constructorWithMessageReturnsPassedMessage() { + void constructorWithMessageReturnsPassedMessage() { // given final String message = " brrrr"; @@ -24,7 +24,7 @@ public void constructorWithMessageReturnsPassedMessage() { } @Test - public void constructorWithMessageAndCauseReturnsPassedMessageAndCause() { + void constructorWithMessageAndCauseReturnsPassedMessageAndCause() { // given final String message = " brrrr"; diff --git a/src/test/java/pl/szczepanik/silencio/core/KeyTest.java b/src/test/java/pl/szczepanik/silencio/core/KeyTest.java index f94047e..8ac3b37 100644 --- a/src/test/java/pl/szczepanik/silencio/core/KeyTest.java +++ b/src/test/java/pl/szczepanik/silencio/core/KeyTest.java @@ -11,7 +11,7 @@ public class KeyTest extends GenericTest { @Test - public void shouldReturnKey() { + void shouldReturnKey() { // given String keyString = "oneKey"; @@ -24,7 +24,7 @@ public void shouldReturnKey() { } @Test - public void shouldReturnValidFormat() { + void shouldReturnValidFormat() { // given String keyName = "golden key"; diff --git a/src/test/java/pl/szczepanik/silencio/core/ProcessorExceptionTest.java b/src/test/java/pl/szczepanik/silencio/core/ProcessorExceptionTest.java index 7143790..d743664 100644 --- a/src/test/java/pl/szczepanik/silencio/core/ProcessorExceptionTest.java +++ b/src/test/java/pl/szczepanik/silencio/core/ProcessorExceptionTest.java @@ -11,7 +11,7 @@ public class ProcessorExceptionTest extends GenericTest { @Test - public void constructorWithMessageReturnsPassedMessage() { + void constructorWithMessageReturnsPassedMessage() { // given final String message = " brrrr"; @@ -24,7 +24,7 @@ public void constructorWithMessageReturnsPassedMessage() { } @Test - public void constructorWithMessageAndCauseReturnsPassedMessageAndCause() { + void constructorWithMessageAndCauseReturnsPassedMessageAndCause() { // given final Exception cause = new RuntimeException("maybe, maybe"); diff --git a/src/test/java/pl/szczepanik/silencio/core/ProcessorStateMachineTest.java b/src/test/java/pl/szczepanik/silencio/core/ProcessorStateMachineTest.java index d3ef976..4ed6be1 100644 --- a/src/test/java/pl/szczepanik/silencio/core/ProcessorStateMachineTest.java +++ b/src/test/java/pl/szczepanik/silencio/core/ProcessorStateMachineTest.java @@ -12,7 +12,7 @@ public class ProcessorStateMachineTest extends GenericTest { @Test - public void shouldNotAllowToValidateProcessInCreatedState() { + void shouldNotAllowToValidateProcessInCreatedState() { // given ProcessorStateMachine machine = new ProcessorStateMachine(); @@ -24,7 +24,7 @@ public void shouldNotAllowToValidateProcessInCreatedState() { } @Test - public void shouldAllowForValidateProcess() { + void shouldAllowForValidateProcess() { // given ProcessorStateMachine machine = new ProcessorStateMachine(); @@ -37,7 +37,7 @@ public void shouldAllowForValidateProcess() { } @Test - public void shouldNotAllowToValidateWriteInCreatedState() { + void shouldNotAllowToValidateWriteInCreatedState() { // given ProcessorStateMachine machine = new ProcessorStateMachine(); @@ -49,7 +49,7 @@ public void shouldNotAllowToValidateWriteInCreatedState() { } @Test - public void shouldAllowForValidateWrite() { + void shouldAllowForValidateWrite() { // given ProcessorStateMachine machine = new ProcessorStateMachine(); @@ -61,7 +61,7 @@ public void shouldAllowForValidateWrite() { } @Test - public void shouldAllowForReLoad() { + void shouldAllowForReLoad() { // given ProcessorStateMachine machine = new ProcessorStateMachine(); diff --git a/src/test/java/pl/szczepanik/silencio/core/ValueTest.java b/src/test/java/pl/szczepanik/silencio/core/ValueTest.java index 7b57f40..a84b7f7 100644 --- a/src/test/java/pl/szczepanik/silencio/core/ValueTest.java +++ b/src/test/java/pl/szczepanik/silencio/core/ValueTest.java @@ -11,7 +11,7 @@ public class ValueTest extends GenericTest { @Test - public void shouldReturnValue() { + void shouldReturnValue() { // given String value = "secondValue"; @@ -24,7 +24,7 @@ public void shouldReturnValue() { } @Test - public void shouldReturnValidFormat() { + void shouldReturnValidFormat() { // given String valueName = "go, go go!"; diff --git a/src/test/java/pl/szczepanik/silencio/decisions/MatcherDecisionTest.java b/src/test/java/pl/szczepanik/silencio/decisions/MatcherDecisionTest.java index 2f8d536..d3ba7c6 100644 --- a/src/test/java/pl/szczepanik/silencio/decisions/MatcherDecisionTest.java +++ b/src/test/java/pl/szczepanik/silencio/decisions/MatcherDecisionTest.java @@ -14,7 +14,7 @@ public class MatcherDecisionTest extends GenericTest { @Test - public void shouldAcceptValuesAsWords() { + void shouldAcceptValuesAsWords() { // given Decision d = new MatcherDecision("\\w+"); @@ -28,7 +28,7 @@ public void shouldAcceptValuesAsWords() { } @Test - public void shouldNotAcceptKeysAsDigits() { + void shouldNotAcceptKeysAsDigits() { // given Decision d = new MatcherDecision("[^\\d]", "foo"); @@ -42,7 +42,7 @@ public void shouldNotAcceptKeysAsDigits() { } @Test - public void shouldAcceptNullValues() { + void shouldAcceptNullValues() { // given Decision d = new MatcherDecision(null, null); diff --git a/src/test/java/pl/szczepanik/silencio/decisions/NegativeDecisionTest.java b/src/test/java/pl/szczepanik/silencio/decisions/NegativeDecisionTest.java index 032c739..b527606 100644 --- a/src/test/java/pl/szczepanik/silencio/decisions/NegativeDecisionTest.java +++ b/src/test/java/pl/szczepanik/silencio/decisions/NegativeDecisionTest.java @@ -14,7 +14,7 @@ public class NegativeDecisionTest extends GenericTest { @Test - public void shouldNotAllowForConversion() { + void shouldNotAllowForConversion() { // given Decision d = new NegativeDecision(); diff --git a/src/test/java/pl/szczepanik/silencio/decisions/PositiveDecisionTest.java b/src/test/java/pl/szczepanik/silencio/decisions/PositiveDecisionTest.java index 5e215d2..3962860 100644 --- a/src/test/java/pl/szczepanik/silencio/decisions/PositiveDecisionTest.java +++ b/src/test/java/pl/szczepanik/silencio/decisions/PositiveDecisionTest.java @@ -14,7 +14,7 @@ public class PositiveDecisionTest extends GenericTest { @Test - public void shouldAllowForConversion() { + void shouldAllowForConversion() { // given Decision d = new PositiveDecision(); diff --git a/src/test/java/pl/szczepanik/silencio/diagnostics/BlankCharConverterTest.java b/src/test/java/pl/szczepanik/silencio/diagnostics/BlankCharConverterTest.java index 1400338..1d36dde 100644 --- a/src/test/java/pl/szczepanik/silencio/diagnostics/BlankCharConverterTest.java +++ b/src/test/java/pl/szczepanik/silencio/diagnostics/BlankCharConverterTest.java @@ -11,7 +11,7 @@ public class BlankCharConverterTest extends GenericTest { @Test - public void shouldReturnConstantValue() { + void shouldReturnConstantValue() { // given Converter converter = new WhiteCharConverter(); diff --git a/src/test/java/pl/szczepanik/silencio/diagnostics/ConstantValueConverterTest.java b/src/test/java/pl/szczepanik/silencio/diagnostics/ConstantValueConverterTest.java index 0633eeb..81668f6 100644 --- a/src/test/java/pl/szczepanik/silencio/diagnostics/ConstantValueConverterTest.java +++ b/src/test/java/pl/szczepanik/silencio/diagnostics/ConstantValueConverterTest.java @@ -11,7 +11,7 @@ public class ConstantValueConverterTest extends GenericTest { @Test - public void shouldReturnConstantValue() { + void shouldReturnConstantValue() { // given Converter converter = new ConstantValueConverter(); diff --git a/src/test/java/pl/szczepanik/silencio/diagnostics/KeyValueConverterTest.java b/src/test/java/pl/szczepanik/silencio/diagnostics/KeyValueConverterTest.java index 109035b..2f7d7e4 100644 --- a/src/test/java/pl/szczepanik/silencio/diagnostics/KeyValueConverterTest.java +++ b/src/test/java/pl/szczepanik/silencio/diagnostics/KeyValueConverterTest.java @@ -11,7 +11,7 @@ public class KeyValueConverterTest extends GenericTest { @Test - public void shouldReturnCorrectValue() { + void shouldReturnCorrectValue() { // given Value value = new Value("someValue"); diff --git a/src/test/java/pl/szczepanik/silencio/diagnostics/PassedValueConverterTest.java b/src/test/java/pl/szczepanik/silencio/diagnostics/PassedValueConverterTest.java index 17bdad7..d9ee42b 100644 --- a/src/test/java/pl/szczepanik/silencio/diagnostics/PassedValueConverterTest.java +++ b/src/test/java/pl/szczepanik/silencio/diagnostics/PassedValueConverterTest.java @@ -11,7 +11,7 @@ public class PassedValueConverterTest extends GenericTest { @Test - public void shouldReturnCorrectValue() { + void shouldReturnCorrectValue() { // given Value value = new Value("someValue"); diff --git a/src/test/java/pl/szczepanik/silencio/diagnostics/ProcessorSmokeCheckerTest.java b/src/test/java/pl/szczepanik/silencio/diagnostics/ProcessorSmokeCheckerTest.java index 400fb6e..17cd8c3 100644 --- a/src/test/java/pl/szczepanik/silencio/diagnostics/ProcessorSmokeCheckerTest.java +++ b/src/test/java/pl/szczepanik/silencio/diagnostics/ProcessorSmokeCheckerTest.java @@ -18,7 +18,7 @@ public class ProcessorSmokeCheckerTest extends GenericTest { @Test - public void shouldPassWithStubProcessor() { + void shouldPassWithStubProcessor() { // given StubProcessor processor = new StubProcessor(Format.JSON, new Converter[] { new StubConverter() }); @@ -30,7 +30,7 @@ public void shouldPassWithStubProcessor() { } @Test - public void shouldThrowProcessorExceptionWhenValidationFails() { + void shouldThrowProcessorExceptionWhenValidationFails() { final String errorMessage = "Ups, I did it again!"; diff --git a/src/test/java/pl/szczepanik/silencio/integration/BlankConverterIntegrationTest.java b/src/test/java/pl/szczepanik/silencio/integration/BlankConverterIntegrationTest.java index 368c40e..28c6795 100644 --- a/src/test/java/pl/szczepanik/silencio/integration/BlankConverterIntegrationTest.java +++ b/src/test/java/pl/szczepanik/silencio/integration/BlankConverterIntegrationTest.java @@ -5,7 +5,8 @@ import java.io.IOException; import java.io.StringWriter; -import org.junit.jupiter.api.Test;import pl.szczepanik.silencio.GenericTest; +import org.junit.jupiter.api.Test; +import pl.szczepanik.silencio.GenericTest; import pl.szczepanik.silencio.api.Format; import pl.szczepanik.silencio.api.Processor; import pl.szczepanik.silencio.core.Builder; @@ -17,7 +18,7 @@ public class BlankConverterIntegrationTest extends GenericTest { @Test - public void shoulClearValuesWhenBlankIsExecutedAsLast() throws IOException { + void shoulClearValuesWhenBlankIsExecutedAsLast() throws IOException { // given Processor processor = new Builder(Format.JSON).with(Builder.NUMBER_SEQUENCE, Builder.BLANK).build(); diff --git a/src/test/java/pl/szczepanik/silencio/integration/BuilderIntegrationTest.java b/src/test/java/pl/szczepanik/silencio/integration/BuilderIntegrationTest.java index 0b32511..3ec305d 100644 --- a/src/test/java/pl/szczepanik/silencio/integration/BuilderIntegrationTest.java +++ b/src/test/java/pl/szczepanik/silencio/integration/BuilderIntegrationTest.java @@ -5,7 +5,8 @@ import java.io.StringWriter; import java.util.Properties; -import org.junit.jupiter.api.Test;import pl.szczepanik.silencio.GenericTest; +import org.junit.jupiter.api.Test; +import pl.szczepanik.silencio.GenericTest; import pl.szczepanik.silencio.api.Format; import pl.szczepanik.silencio.api.Processor; import pl.szczepanik.silencio.converters.StringConverter; @@ -20,7 +21,7 @@ public class BuilderIntegrationTest extends GenericTest { @Test - public void shouldProcessPropertiesFile() throws IOException { + void shouldProcessPropertiesFile() throws IOException { // given Builder builder = new Builder(Format.PROPERTIES); diff --git a/src/test/java/pl/szczepanik/silencio/integration/EmptyContentIntegrationTest.java b/src/test/java/pl/szczepanik/silencio/integration/EmptyContentIntegrationTest.java index fba3b86..c238e35 100644 --- a/src/test/java/pl/szczepanik/silencio/integration/EmptyContentIntegrationTest.java +++ b/src/test/java/pl/szczepanik/silencio/integration/EmptyContentIntegrationTest.java @@ -34,7 +34,7 @@ public static Collection data() { @MethodSource("data") @ParameterizedTest(name = "\"{0}\" with \"{1}\"") - public void shouldNotFailOnEmptyContent(Format format, String fileName) { + void shouldNotFailOnEmptyContent(Format format, String fileName) { initDataWithNameTest(format, fileName); diff --git a/src/test/java/pl/szczepanik/silencio/integration/JSONProcessorIntegrationTest.java b/src/test/java/pl/szczepanik/silencio/integration/JSONProcessorIntegrationTest.java index 7ee9ed1..eb3529e 100644 --- a/src/test/java/pl/szczepanik/silencio/integration/JSONProcessorIntegrationTest.java +++ b/src/test/java/pl/szczepanik/silencio/integration/JSONProcessorIntegrationTest.java @@ -4,7 +4,8 @@ import java.io.StringWriter; -import org.junit.jupiter.api.Test;import pl.szczepanik.silencio.GenericTest; +import org.junit.jupiter.api.Test; +import pl.szczepanik.silencio.GenericTest; import pl.szczepanik.silencio.api.Format; import pl.szczepanik.silencio.api.Processor; import pl.szczepanik.silencio.core.Builder; @@ -16,7 +17,7 @@ public class JSONProcessorIntegrationTest extends GenericTest { @Test - public void shouldProcessJSONFile() { + void shouldProcessJSONFile() { // given Processor processor = new Builder(Format.JSON).with(Builder.NUMBER_SEQUENCE).build(); diff --git a/src/test/java/pl/szczepanik/silencio/integration/PropertiesProcessorIntegrationTest.java b/src/test/java/pl/szczepanik/silencio/integration/PropertiesProcessorIntegrationTest.java index 92b3e04..c44b1b5 100644 --- a/src/test/java/pl/szczepanik/silencio/integration/PropertiesProcessorIntegrationTest.java +++ b/src/test/java/pl/szczepanik/silencio/integration/PropertiesProcessorIntegrationTest.java @@ -5,7 +5,8 @@ import java.io.StringWriter; import java.util.Properties; -import org.junit.jupiter.api.Test;import pl.szczepanik.silencio.GenericTest; +import org.junit.jupiter.api.Test; +import pl.szczepanik.silencio.GenericTest; import pl.szczepanik.silencio.api.Format; import pl.szczepanik.silencio.api.Processor; import pl.szczepanik.silencio.core.Builder; @@ -18,7 +19,7 @@ public class PropertiesProcessorIntegrationTest extends GenericTest { @Test - public void shouldProcessPropertiesFile() throws IOException { + void shouldProcessPropertiesFile() throws IOException { // given Processor processor = new Builder(Format.PROPERTIES).with(Builder.BLANK).build(); diff --git a/src/test/java/pl/szczepanik/silencio/integration/SuvIntegrationTest.java b/src/test/java/pl/szczepanik/silencio/integration/SuvIntegrationTest.java index a0255da..5dd76bb 100644 --- a/src/test/java/pl/szczepanik/silencio/integration/SuvIntegrationTest.java +++ b/src/test/java/pl/szczepanik/silencio/integration/SuvIntegrationTest.java @@ -34,7 +34,7 @@ public static Collection data() { @MethodSource("data") @ParameterizedTest(name = "\"{0}\" with \"{1}\"") - public void shouldNotCrashOnDiagnosticTests(Processor processor, String suvInput) { + void shouldNotCrashOnDiagnosticTests(Processor processor, String suvInput) { initDataWithNameTest(processor, suvInput); diff --git a/src/test/java/pl/szczepanik/silencio/integration/WikipediaConverterIntegrationTest.java b/src/test/java/pl/szczepanik/silencio/integration/WikipediaConverterIntegrationTest.java index 721e823..5020452 100644 --- a/src/test/java/pl/szczepanik/silencio/integration/WikipediaConverterIntegrationTest.java +++ b/src/test/java/pl/szczepanik/silencio/integration/WikipediaConverterIntegrationTest.java @@ -4,7 +4,8 @@ import java.io.StringWriter; -import org.junit.jupiter.api.Test;import pl.szczepanik.silencio.GenericTest; +import org.junit.jupiter.api.Test; +import pl.szczepanik.silencio.GenericTest; import pl.szczepanik.silencio.api.Format; import pl.szczepanik.silencio.api.Processor; import pl.szczepanik.silencio.converters.WikipediaConverter; @@ -18,7 +19,7 @@ public class WikipediaConverterIntegrationTest extends GenericTest { @Test - public void shouldGetWordsFromWikipedia() { + void shouldGetWordsFromWikipedia() { // WARNING: this test fail when internet connection is not available // given diff --git a/src/test/java/pl/szczepanik/silencio/integration/XMLProcessorIntegrationTest.java b/src/test/java/pl/szczepanik/silencio/integration/XMLProcessorIntegrationTest.java index 6d1c5ac..2e46e24 100644 --- a/src/test/java/pl/szczepanik/silencio/integration/XMLProcessorIntegrationTest.java +++ b/src/test/java/pl/szczepanik/silencio/integration/XMLProcessorIntegrationTest.java @@ -4,7 +4,8 @@ import java.io.StringWriter; -import org.junit.jupiter.api.Test;import pl.szczepanik.silencio.GenericTest; +import org.junit.jupiter.api.Test; +import pl.szczepanik.silencio.GenericTest; import pl.szczepanik.silencio.api.Format; import pl.szczepanik.silencio.api.Processor; import pl.szczepanik.silencio.core.Builder; @@ -16,7 +17,7 @@ public class XMLProcessorIntegrationTest extends GenericTest { @Test - public void shouldProcessXMLFile() { + void shouldProcessXMLFile() { // given Processor processor = new Builder(Format.XML).with(Builder.NUMBER_SEQUENCE).build(); diff --git a/src/test/java/pl/szczepanik/silencio/processors/JSONParser_isBasicTypeTest.java b/src/test/java/pl/szczepanik/silencio/processors/JSONParser_isBasicTypeTest.java index ddf80de..52728eb 100644 --- a/src/test/java/pl/szczepanik/silencio/processors/JSONParser_isBasicTypeTest.java +++ b/src/test/java/pl/szczepanik/silencio/processors/JSONParser_isBasicTypeTest.java @@ -39,7 +39,7 @@ public static Collection data() { @MethodSource("data") @ParameterizedTest(name = "\"{0}\" with \"{1}\"") - public void shouldValidateBasicObject(Object type, boolean isBasic) throws Exception { + void shouldValidateBasicObject(Object type, boolean isBasic) throws Exception { initDataWithNameTest(type, isBasic); // given diff --git a/src/test/java/pl/szczepanik/silencio/processors/JSONProcessorTest.java b/src/test/java/pl/szczepanik/silencio/processors/JSONProcessorTest.java index baa8fa9..e7822fc 100644 --- a/src/test/java/pl/szczepanik/silencio/processors/JSONProcessorTest.java +++ b/src/test/java/pl/szczepanik/silencio/processors/JSONProcessorTest.java @@ -23,7 +23,7 @@ public class JSONProcessorTest extends GenericTest { @Test - public void shouldReturnPassedFormat() { + void shouldReturnPassedFormat() { // given Processor processor = new JSONProcessor(); @@ -36,7 +36,7 @@ public void shouldReturnPassedFormat() { } @Test - public void shouldLoadJSONFileOnRealLoad() { + void shouldLoadJSONFileOnRealLoad() { // given JSONProcessor processor = new JSONProcessor(); @@ -53,7 +53,7 @@ public void shouldLoadJSONFileOnRealLoad() { } @Test - public void shouldFailWhenLoadingInvalidJSONFile() { + void shouldFailWhenLoadingInvalidJSONFile() { // given Processor processor = new JSONProcessor(); @@ -70,7 +70,7 @@ public void shouldFailWhenLoadingInvalidJSONFile() { } @Test - public void shouldFailWhenWritingToInvalidWriter() { + void shouldFailWhenWritingToInvalidWriter() { final String errorMessage = "Don't write into this writer!"; diff --git a/src/test/java/pl/szczepanik/silencio/processors/PropertiesProcessorTest.java b/src/test/java/pl/szczepanik/silencio/processors/PropertiesProcessorTest.java index 3f02351..a9f51f9 100644 --- a/src/test/java/pl/szczepanik/silencio/processors/PropertiesProcessorTest.java +++ b/src/test/java/pl/szczepanik/silencio/processors/PropertiesProcessorTest.java @@ -25,7 +25,7 @@ public class PropertiesProcessorTest extends GenericTest { @Test - public void shouldReturnPassedFormat() { + void shouldReturnPassedFormat() { // given PropertiesProcessor processor = new PropertiesProcessor(); @@ -38,7 +38,7 @@ public void shouldReturnPassedFormat() { } @Test - public void shouldLoadPropertiesFileOnRealLoad() throws IOException { + void shouldLoadPropertiesFileOnRealLoad() throws IOException { // given input = ResourceLoader.loadAsReader("suv.properties"); @@ -60,7 +60,7 @@ public void shouldLoadPropertiesFileOnRealLoad() throws IOException { } @Test - public void shouldFailWhenLoadingInvalidPropertiesFile() { + void shouldFailWhenLoadingInvalidPropertiesFile() { // given input = ResourceLoader.loadAsReader("corrupted.properties"); @@ -73,7 +73,7 @@ public void shouldFailWhenLoadingInvalidPropertiesFile() { } @Test - public void shouldInvokeProcessByRealProcess() { + void shouldInvokeProcessByRealProcess() { // given PropertiesProcessor processor = new PropertiesProcessor(); @@ -91,7 +91,7 @@ public void shouldInvokeProcessByRealProcess() { } @Test - public void shouldFailOnRealWrite() { + void shouldFailOnRealWrite() { // given final String errorMessage = "Don't write into this writer any more!"; @@ -105,7 +105,7 @@ public void shouldFailOnRealWrite() { } @Test - public void shouldWritePropertiesIntoWriter() throws IOException { + void shouldWritePropertiesIntoWriter() throws IOException { // given input = ResourceLoader.loadAsReader("suv.properties"); diff --git a/src/test/java/pl/szczepanik/silencio/processors/XMLProcessorTest.java b/src/test/java/pl/szczepanik/silencio/processors/XMLProcessorTest.java index ebafe8f..ec321a4 100644 --- a/src/test/java/pl/szczepanik/silencio/processors/XMLProcessorTest.java +++ b/src/test/java/pl/szczepanik/silencio/processors/XMLProcessorTest.java @@ -23,7 +23,7 @@ public class XMLProcessorTest extends GenericTest { @Test - public void shouldReturnPassedFormat() { + void shouldReturnPassedFormat() { // given XMLProcessor processor = new XMLProcessor(); @@ -36,7 +36,7 @@ public void shouldReturnPassedFormat() { } @Test - public void shouldLoadXMLFileOnRealLoad() { + void shouldLoadXMLFileOnRealLoad() { // given XMLProcessor processor = new XMLProcessor(); @@ -53,7 +53,7 @@ public void shouldLoadXMLFileOnRealLoad() { } @Test - public void shouldFailWhenLoadingInvalidJSONFile() { + void shouldFailWhenLoadingInvalidJSONFile() { // given Processor processor = new XMLProcessor(); @@ -70,7 +70,7 @@ public void shouldFailWhenLoadingInvalidJSONFile() { } @Test - public void shouldFailWhenWritingToInvalidWriter() { + void shouldFailWhenWritingToInvalidWriter() { final String errorMessage = "Don't write into this writer!"; diff --git a/src/test/java/pl/szczepanik/silencio/processors/YAMLProcessorTest.java b/src/test/java/pl/szczepanik/silencio/processors/YAMLProcessorTest.java index d17deab..909e483 100644 --- a/src/test/java/pl/szczepanik/silencio/processors/YAMLProcessorTest.java +++ b/src/test/java/pl/szczepanik/silencio/processors/YAMLProcessorTest.java @@ -22,7 +22,7 @@ public class YAMLProcessorTest extends GenericTest { @Test - public void shouldReturnPassedFormat() { + void shouldReturnPassedFormat() { // given YAMLProcessor processor = new YAMLProcessor(); @@ -35,7 +35,7 @@ public void shouldReturnPassedFormat() { } @Test - public void shouldLoadYAMLFileOnRealLoad() { + void shouldLoadYAMLFileOnRealLoad() { // given YAMLProcessor processor = new YAMLProcessor(); @@ -52,7 +52,7 @@ public void shouldLoadYAMLFileOnRealLoad() { } @Test - public void shouldFailWhenLoadingInvalidYAMLFile() { + void shouldFailWhenLoadingInvalidYAMLFile() { // given YAMLProcessor processor = new YAMLProcessor(); @@ -69,7 +69,7 @@ public void shouldFailWhenLoadingInvalidYAMLFile() { } @Test - public void shouldFailWhenWritingToInvalidWriter() { + void shouldFailWhenWritingToInvalidWriter() { final String errorMessage = "Don't write into this writer!"; diff --git a/src/test/java/pl/szczepanik/silencio/processors/visitors/AbstractVisitorTest.java b/src/test/java/pl/szczepanik/silencio/processors/visitors/AbstractVisitorTest.java index d60b79e..158e21d 100644 --- a/src/test/java/pl/szczepanik/silencio/processors/visitors/AbstractVisitorTest.java +++ b/src/test/java/pl/szczepanik/silencio/processors/visitors/AbstractVisitorTest.java @@ -14,7 +14,7 @@ public class AbstractVisitorTest extends GenericTest { @Test - public void shouldFailWhenPassingValueToProcessValue() { + void shouldFailWhenPassingValueToProcessValue() { // given Key key = new Key("123"); diff --git a/src/test/java/pl/szczepanik/silencio/processors/visitors/AbstractVisitor_processValueTest.java b/src/test/java/pl/szczepanik/silencio/processors/visitors/AbstractVisitor_processValueTest.java index db24996..c25abb9 100644 --- a/src/test/java/pl/szczepanik/silencio/processors/visitors/AbstractVisitor_processValueTest.java +++ b/src/test/java/pl/szczepanik/silencio/processors/visitors/AbstractVisitor_processValueTest.java @@ -61,7 +61,7 @@ public static Collection data() { @MethodSource("data") @ParameterizedTest(name = "\"{0}\" with \"{1}\"") - public void shouldProcessAllConvertersForPositiveDecision( + void shouldProcessAllConvertersForPositiveDecision( Decision[] decisions, Converter[] processors, Key expectedKey, @@ -85,7 +85,7 @@ public void shouldProcessAllConvertersForPositiveDecision( } @AfterEach - public void reset() { + void reset() { visitCounter.reset(); } diff --git a/src/test/java/pl/szczepanik/silencio/processors/visitors/JSONVisitorTest.java b/src/test/java/pl/szczepanik/silencio/processors/visitors/JSONVisitorTest.java index 11ea2ab..a623d03 100644 --- a/src/test/java/pl/szczepanik/silencio/processors/visitors/JSONVisitorTest.java +++ b/src/test/java/pl/szczepanik/silencio/processors/visitors/JSONVisitorTest.java @@ -24,7 +24,7 @@ public class JSONVisitorTest extends GenericTest { @Test - public void shouldReportExceptionOnUnsupportedModel() throws Exception { + void shouldReportExceptionOnUnsupportedModel() throws Exception { // when final String key = "myKey"; @@ -38,7 +38,7 @@ public void shouldReportExceptionOnUnsupportedModel() throws Exception { } @Test - public void shouldVisitAllJsonNodes() throws IOException { + void shouldVisitAllJsonNodes() throws IOException { final int nodeCounter = 14; diff --git a/src/test/java/pl/szczepanik/silencio/processors/visitors/PropertiesVisitorTest.java b/src/test/java/pl/szczepanik/silencio/processors/visitors/PropertiesVisitorTest.java index 800618d..5759046 100644 --- a/src/test/java/pl/szczepanik/silencio/processors/visitors/PropertiesVisitorTest.java +++ b/src/test/java/pl/szczepanik/silencio/processors/visitors/PropertiesVisitorTest.java @@ -19,7 +19,7 @@ public class PropertiesVisitorTest extends GenericTest { @Test - public void shouldVisitAllJsonNodes() throws IOException { + void shouldVisitAllJsonNodes() throws IOException { final int nodesCounter = 16; diff --git a/src/test/java/pl/szczepanik/silencio/processors/visitors/XMLVisitorTest.java b/src/test/java/pl/szczepanik/silencio/processors/visitors/XMLVisitorTest.java index 716e2ed..429e14e 100644 --- a/src/test/java/pl/szczepanik/silencio/processors/visitors/XMLVisitorTest.java +++ b/src/test/java/pl/szczepanik/silencio/processors/visitors/XMLVisitorTest.java @@ -30,7 +30,7 @@ public class XMLVisitorTest extends GenericTest { @Test - public void shouldReportExceptionOnUnsupportedModel() throws Exception { + void shouldReportExceptionOnUnsupportedModel() throws Exception { // when final String key = "myKey"; @@ -44,7 +44,7 @@ public void shouldReportExceptionOnUnsupportedModel() throws Exception { } @Test - public void shouldVisitAllXMLNodes() throws ParserConfigurationException, SAXException, IOException { + void shouldVisitAllXMLNodes() throws ParserConfigurationException, SAXException, IOException { final int nodeCounter = 14; @@ -67,7 +67,7 @@ public void shouldVisitAllXMLNodes() throws ParserConfigurationException, SAXExc } @Test - public void shouldFailOnInvalidNodeType() throws Exception { + void shouldFailOnInvalidNodeType() throws Exception { // given XMLVisitor visitor = new XMLVisitor(); diff --git a/src/test/java/pl/szczepanik/silencio/processors/visitors/YAMLVisitorTest.java b/src/test/java/pl/szczepanik/silencio/processors/visitors/YAMLVisitorTest.java index 1a77830..545ea9a 100644 --- a/src/test/java/pl/szczepanik/silencio/processors/visitors/YAMLVisitorTest.java +++ b/src/test/java/pl/szczepanik/silencio/processors/visitors/YAMLVisitorTest.java @@ -25,7 +25,7 @@ public class YAMLVisitorTest extends GenericTest { @Test - public void shouldReportExceptionOnUnsupportedModel() throws Exception { + void shouldReportExceptionOnUnsupportedModel() throws Exception { // when final String key = "myKey"; @@ -39,7 +39,7 @@ public void shouldReportExceptionOnUnsupportedModel() throws Exception { } @Test - public void shouldVisitAllYamlNodes() throws IOException { + void shouldVisitAllYamlNodes() throws IOException { final int nodeCounter = 16; diff --git a/src/test/java/pl/szczepanik/silencio/utils/IOUtilityTest.java b/src/test/java/pl/szczepanik/silencio/utils/IOUtilityTest.java index 21e864c..a43bb35 100644 --- a/src/test/java/pl/szczepanik/silencio/utils/IOUtilityTest.java +++ b/src/test/java/pl/szczepanik/silencio/utils/IOUtilityTest.java @@ -24,21 +24,21 @@ public class IOUtilityTest extends GenericTest { private static final String INVALID_HTML_PAGE = "This does not look like valid HTML page"; private static final String URL_ADDRESS = "http://www.fancy.page"; - + private MockedStatic mockedStatic; @BeforeEach - public void mockBefore() { + void mockBefore() { mockedStatic = mockStatic(IOUtils.class); } @AfterEach - public void closeAfter() { + void closeAfter() { mockedStatic.close(); } @Test - public void shouldReturnWholeHtmlPage() throws Exception { + void shouldReturnWholeHtmlPage() throws Exception { // given when(IOUtils.toString(new URL(URL_ADDRESS), StandardCharsets.UTF_8)) @@ -52,7 +52,7 @@ public void shouldReturnWholeHtmlPage() throws Exception { } @Test - public void shouldFailOnIOException() throws Exception { + void shouldFailOnIOException() throws Exception { String errorMessage = "Something is wrong!"; @@ -67,7 +67,7 @@ public void shouldFailOnIOException() throws Exception { } @Test - public void shouldFailWhenUrlIsNotValid() { + void shouldFailWhenUrlIsNotValid() { // given String invalidURL = "wwww.my@funpage";