diff --git a/src/test/kotlin/net/thauvin/erik/kobalt/plugin/versioneye/UtilsTest.kt b/src/test/kotlin/net/thauvin/erik/kobalt/plugin/versioneye/UtilsTest.kt index b057977..527cbfb 100644 --- a/src/test/kotlin/net/thauvin/erik/kobalt/plugin/versioneye/UtilsTest.kt +++ b/src/test/kotlin/net/thauvin/erik/kobalt/plugin/versioneye/UtilsTest.kt @@ -37,6 +37,7 @@ import org.testng.annotations.Test @Test class UtilsTest { + val text = "This is a test" @Test fun alt() { @@ -60,9 +61,26 @@ class UtilsTest { Assert.assertEquals(Utils.plural(text, 2, ies, y), text + ies, "plural($text, count:2, $ies, $y)") } + @Test + fun red() { + Assert.assertEquals(Utils.red(text), AsciiArt.RED + text + AsciiArt.RESET, "red($text)") + Assert.assertEquals(Utils.red(text, false), text, "red($text)") + } + + @Test + fun yellow() { + Assert.assertEquals(Utils.yellow(text), AsciiArt.YELLOW + text + AsciiArt.RESET, "yellow($text)") + Assert.assertEquals(Utils.yellow(text, false), text, "yellow($text)") + } + + @Test + fun green() { + Assert.assertEquals(Utils.green(text), AsciiArt.GREEN + text + AsciiArt.RESET, "green($text)") + Assert.assertEquals(Utils.green(text, false), text, "green($text)") + } + @Test fun redLight() { - val text = "This is a test" Assert.assertEquals(Utils.redLight(text, 1, true, true), AsciiArt.RED + text + AsciiArt.RESET, "redLight($text, count:1, fail:true, colors:true)") Assert.assertEquals(Utils.redLight(text, 1, false, true), AsciiArt.YELLOW + text + AsciiArt.RESET,