-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
896 additions
and
909 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 0 additions & 30 deletions
30
cffu-core/src/test/java/io/foldright/cffu/CffuStateTest.java
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
cffu-core/src/test/java/io/foldright/cffu/CffuStateTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package io.foldright.cffu | ||
|
||
import io.kotest.matchers.shouldBe | ||
import org.junit.jupiter.api.Test | ||
import org.junit.jupiter.api.condition.EnabledForJreRange | ||
import org.junit.jupiter.api.condition.JRE.JAVA_19 | ||
import java.util.concurrent.Future | ||
|
||
@EnabledForJreRange(min = JAVA_19) | ||
private class CffuStateTest { | ||
@Test | ||
fun toCffuState() { | ||
CffuState.toCffuState(Future.State.RUNNING) shouldBe CffuState.RUNNING | ||
CffuState.toCffuState(Future.State.SUCCESS) shouldBe CffuState.SUCCESS | ||
CffuState.toCffuState(Future.State.FAILED) shouldBe CffuState.FAILED | ||
CffuState.toCffuState(Future.State.CANCELLED) shouldBe CffuState.CANCELLED | ||
} | ||
|
||
@Test | ||
fun toFutureState() { | ||
CffuState.RUNNING.toFutureState() shouldBe Future.State.RUNNING | ||
CffuState.SUCCESS.toFutureState() shouldBe Future.State.SUCCESS | ||
CffuState.FAILED.toFutureState() shouldBe Future.State.FAILED | ||
CffuState.CANCELLED.toFutureState() shouldBe Future.State.CANCELLED | ||
} | ||
} |
Oops, something went wrong.