Skip to content

Commit

Permalink
Fix some more merge conflicts.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Griffin committed Sep 11, 2024
1 parent ca3ce53 commit 34d85ef
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/test/java/com/fauna/e2e/E2EQueryTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import java.util.Optional;
import java.util.concurrent.ExecutionException;

import static com.fauna.codec.Generic.nullableOf;
import static com.fauna.codec.Generic.nullableDocumentOf;
import static com.fauna.query.builder.Query.fql;
import static com.fauna.codec.Generic.listOf;
import static com.fauna.codec.Generic.mapOf;
Expand Down Expand Up @@ -200,19 +200,19 @@ public void query_optionalNotNull() {
public void query_nullableOf() {
var q = fql("Author.byId('9090090')");

var qs = c.query(q, nullableOf(Author.class));
Nullable<Author> actual = qs.getData();
assertInstanceOf(NullDoc.class, actual);
assertEquals("not found", ((NullDoc<Author>)actual).getCause());
var qs = c.query(q, nullableDocumentOf(Author.class));
NullableDocument<Author> actual = qs.getData();
assertInstanceOf(NullDocument.class, actual);
assertEquals("not found", ((NullDocument<Author>)actual).getCause());
}

@Test
public void query_nullableOfNotNull() {
var q = fql("Author.all().first()");
var qs = c.query(q, nullableOf(Author.class));
Nullable<Author> actual = qs.getData();
assertInstanceOf(NonNull.class, actual);
assertEquals("Alice", ((NonNull<Author>)actual).getValue().getFirstName());
var qs = c.query(q, nullableDocumentOf(Author.class));
NullableDocument<Author> actual = qs.getData();
assertInstanceOf(NonNullDocument.class, actual);
assertEquals("Alice", ((NonNullDocument<Author>)actual).getValue().getFirstName());
}

@Test
Expand Down

0 comments on commit 34d85ef

Please sign in to comment.