Skip to content

Commit

Permalink
Add test insert with TTL
Browse files Browse the repository at this point in the history
  • Loading branch information
furlaneto committed Feb 13, 2018
1 parent 786e474 commit 980425c
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import java.time.Duration;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand All @@ -33,14 +34,14 @@
import java.util.concurrent.atomic.AtomicReference;
import java.util.logging.Logger;

import static java.util.logging.Level.FINEST;
import static org.awaitility.Awaitility.await;
import static org.hamcrest.Matchers.notNullValue;
import static org.jnosql.diana.api.document.query.DocumentQueryBuilder.delete;
import static org.jnosql.diana.api.document.query.DocumentQueryBuilder.select;
import static org.jnosql.diana.orientdb.document.DocumentConfigurationUtils.getAsync;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;


Expand Down Expand Up @@ -76,6 +77,11 @@ public void shouldSaveAsync() throws InterruptedException {

}

@Test
public void ShouldThrowExceptionWhenInsertWithTTL() {
assertThrows(UnsupportedOperationException.class, () -> entityManagerAsync.insert(getEntity(), Duration.ZERO));
}

@Test
public void shouldUpdateAsync() {
DocumentEntity entity = getEntity();
Expand Down

0 comments on commit 980425c

Please sign in to comment.