diff --git a/builder/src/test/java/net/kemitix/checkstyle/ruleset/builder/TemplatePropertiesTest.java b/builder/src/test/java/net/kemitix/checkstyle/ruleset/builder/TemplatePropertiesTest.java new file mode 100644 index 0000000..1b4e044 --- /dev/null +++ b/builder/src/test/java/net/kemitix/checkstyle/ruleset/builder/TemplatePropertiesTest.java @@ -0,0 +1,47 @@ +package net.kemitix.checkstyle.ruleset.builder; + +import org.assertj.core.api.SoftAssertions; +import org.junit.Before; +import org.junit.Test; + +import java.nio.file.Path; +import java.nio.file.Paths; + +/** + * Tests for {@link TemplateProperties}. + * + * @author Paul Campbell (pcampbell@kemitix.net) + */ +public class TemplatePropertiesTest { + + private TemplateProperties templateProperties; + + @Before + public void setUp() throws Exception { + templateProperties = new TemplateProperties(); + } + + @Test + public void setAndGet() throws Exception { + //given + final Path checkstyleXml = Paths.get("checkstyle.xml"); + final Path readmeTemplate = Paths.get("readme.md"); + final Path readmeFragments = Paths.get("readme.dir"); + //when + templateProperties.setCheckstyleXml(checkstyleXml); + templateProperties.setReadmeTemplate(readmeTemplate); + templateProperties.setReadmeFragments(readmeFragments); + //then + SoftAssertions.assertSoftly(softly -> { + softly.assertThat(templateProperties.getCheckstyleXml()) + .as("set/getCheckstyleXml()") + .isEqualTo(checkstyleXml); + softly.assertThat(templateProperties.getReadmeTemplate()) + .as("set/getReadmeTemplate()") + .isEqualTo(readmeTemplate); + softly.assertThat(templateProperties.getReadmeFragments()) + .as("set/getReadmeFragments()") + .isEqualTo(readmeFragments); + }); + } +}