mirror of
https://github.com/floci-io/floci-cli.git
synced 2026-11-22 21:50:47 -05:00
chore: first commit
This commit is contained in:
69 files changed
+3697
No files matched your search
@@ -0,0 +1,28 @@
|
||||
package io.floci.cli.unit;
|
||||
|
||||
import io.floci.cli.commands.WaitCommand;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.CsvSource;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class WaitCommandParseTest {
|
||||
|
||||
@ParameterizedTest
|
||||
@CsvSource({
|
||||
"30s, 30000",
|
||||
"2m, 120000",
|
||||
"1h, 3600000",
|
||||
"500ms, 500",
|
||||
"10, 10000"
|
||||
})
|
||||
void testDurationParsing(String input, long expectedMillis) {
|
||||
assertEquals(expectedMillis, WaitCommand.parseDuration(input.trim()));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testNullDuration() {
|
||||
assertEquals(30_000, WaitCommand.parseDuration(null));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user