diff --git a/builder/src/test/java/net/kemitix/checkstyle/ruleset/builder/OutputPropertiesTest.java b/builder/src/test/java/net/kemitix/checkstyle/ruleset/builder/OutputPropertiesTest.java new file mode 100644 index 0000000..8ffd97c --- /dev/null +++ b/builder/src/test/java/net/kemitix/checkstyle/ruleset/builder/OutputPropertiesTest.java @@ -0,0 +1,48 @@ +package net.kemitix.checkstyle.ruleset.builder; + +import lombok.val; +import org.assertj.core.api.SoftAssertions; +import org.junit.Before; +import org.junit.Test; + +import java.nio.file.Paths; +import java.util.HashMap; + +/** + * Tests for {@link OutputProperties}. + * + * @author Paul Campbell (pcampbell@kemitix.net) + */ +public class OutputPropertiesTest { + + private OutputProperties outputProperties; + + @Before + public void setUp() throws Exception { + outputProperties = new OutputProperties(); + } + + @Test + public void setAndGet() throws Exception { + //given + val directory = Paths.get("directory"); + val rulesetFiles = new HashMap(); + val readme = Paths.get("readme.md"); + //when + outputProperties.setDirectory(directory); + outputProperties.setRulesetFiles(rulesetFiles); + outputProperties.setReadme(readme); + //then + SoftAssertions.assertSoftly(softly -> { + softly.assertThat(outputProperties.getDirectory()) + .as("set/getDirectory()") + .isEqualTo(directory); + softly.assertThat(outputProperties.getRulesetFiles()) + .as("set/getRulesetFiles()") + .isEqualTo(rulesetFiles); + softly.assertThat(outputProperties.getReadme()) + .as("set/getReadme()") + .isEqualTo(readme); + }); + } +}