Skip to content

Commit

Permalink
Update EitherTest
Browse files Browse the repository at this point in the history
  • Loading branch information
Glavo committed Jan 18, 2025
1 parent 7055daa commit c093ddc
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/test/java/kala/control/EitherTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
*/
package kala.control;

import kala.TestValue;
import org.junit.jupiter.api.*;

import static org.junit.jupiter.api.Assertions.*;

public final class EitherTest {
private final TestValue<?> value = new TestValue<>("value");
private final TestValue<?> otherValue = new TestValue<>("otherValue");

private final Either.Left<TestValue<?>, ?> left = Either.left(value);
private final Either.Right<?, TestValue<?>> right = Either.right(value);
private final String value = "value";
private final String otherValue = "otherValue";

private final Either.Left<String, ?> left = Either.left(value);
private final Either.Right<?, String> right = Either.right(value);

@Test
public void swapTest() {
Expand Down Expand Up @@ -56,7 +56,4 @@ public void rightProjectionTest() {
assertEquals(left, left.rightProjection().map(it -> otherValue).getEither());
assertEquals(Either.right(otherValue), right.rightProjection().map(it -> otherValue).getEither());
}

private EitherTest() {
}
}

0 comments on commit c093ddc

Please sign in to comment.