@@ -0,0 +1,1464 @@
+package com.github.sbugat.rundeck.plugins;%0A%0Aimport org.assertj.core.api.Assertions;%0Aimport org.junit.Test;%0A%0A/**%0A * Rundeck slack plugin test class.%0A *%0A * @author Sylvain Bugat%0A *%0A */%0Apublic class SlackPluginTest %7B%0A%0A%09@Test%0A%09public void testFormatDuration() %7B%0A%0A%09%09Assertions.assertThat(SlackPlugin.formatDuration(0l)).isEqualTo(%220s%22);%0A%09%09Assertions.assertThat(SlackPlugin.formatDuration(999l)).isEqualTo(%220s%22);%0A%0A%09%09for (long seconds = 1; seconds %3C 60; seconds++) %7B%0A%09%09%09Assertions.assertThat(SlackPlugin.formatDuration(seconds * 1_000l)).isEqualTo(seconds + %22s%22);%0A%09%09%09Assertions.assertThat(SlackPlugin.formatDuration(seconds * 1_000l + 999l)).isEqualTo(seconds + %22s%22);%0A%09%09%7D%0A%0A%09%09for (long minutes = 1; minutes %3C 60; minutes++) %7B%0A%09%09%09Assertions.assertThat(SlackPlugin.formatDuration(minutes * 60_000l)).isEqualTo(minutes + %22m00s%22);%0A%09%09%09Assertions.assertThat(SlackPlugin.formatDuration(minutes * 60_000l + 59_999l)).isEqualTo(minutes + %22m59s%22);%0A%09%09%7D%0A%0A%09%09for (long hours = 1; hours %3C 24; hours++) %7B%0A%09%09%09Assertions.assertThat(SlackPlugin.formatDuration(hours * 3_600_000l)).isEqualTo(hours + %22h00m%22);%0A%09%09%09Assertions.assertThat(SlackPlugin.formatDuration(hours * 3_600_000l + 3_599_999l)).isEqualTo(hours + %22h59m%22);%0A%09%09%7D%0A%0A%09%09for (long days = 1; days %3C 100; days++) %7B%0A%09%09%09Assertions.assertThat(SlackPlugin.formatDuration(days * 86_400_000l)).isEqualTo(days + %22d00h%22);%0A%09%09%09Assertions.assertThat(SlackPlugin.formatDuration(days * 86_400_000l + 86_399_999l)).isEqualTo(days + %22d23h%22);%0A%09%09%7D%0A%09%7D%0A%7D%0A

Add test class