From a67a64e851c0618e1b6e016b072524288dbe5a07 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 26 May 2017 22:26:43 +0100 Subject: [PATCH] plugin: CheckConfiguration: simple builder toString coverage test --- .../plugin/CheckConfigurationTest.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 plugin/src/test/java/net/kemitix/checkstyle/ruleset/plugin/CheckConfigurationTest.java diff --git a/plugin/src/test/java/net/kemitix/checkstyle/ruleset/plugin/CheckConfigurationTest.java b/plugin/src/test/java/net/kemitix/checkstyle/ruleset/plugin/CheckConfigurationTest.java new file mode 100644 index 0000000..3fb2448 --- /dev/null +++ b/plugin/src/test/java/net/kemitix/checkstyle/ruleset/plugin/CheckConfigurationTest.java @@ -0,0 +1,27 @@ +package net.kemitix.checkstyle.ruleset.plugin; + +import org.junit.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * @author Paul Campbell (pcampbell@kemitix.net). + */ +public class CheckConfigurationTest { + + @Test + public void toStringCoverage() { + //given + final String rulesetVersion = "ruleset version"; + final String sourceDirectory = "source directory"; + //when + final String result = CheckConfiguration.builder() + .rulesetVersion(rulesetVersion) + .sourceDirectory(sourceDirectory) + .toString(); + //then + System.out.println("result = " + result); + assertThat(result).contains("rulesetVersion=ruleset version") + .contains("sourceDirectory=source directory"); + } +}