Skip to content

Commit

Permalink
SurrealTest: add testCreateWithId
Browse files Browse the repository at this point in the history
  • Loading branch information
coder966 committed Sep 20, 2022
1 parent 1b5d419 commit ba52cec
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/test/java/SurrealTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
public class SurrealTest {

private Surreal surreal;
private String personId;

@BeforeAll
public void init(){
surreal = new Surreal("172.18.0.2", 8000);
personId = System.currentTimeMillis()+"";
}

@Test
Expand Down Expand Up @@ -41,4 +43,12 @@ public void testCreateNoId() {
log.info("new person {}", person);
}

@Test
@Order(5)
public void testCreateWithId() {
Person person = new Person("Founder and CEO", "Tobie", "Morgan Hitchcock", true);
person = surreal.create("person:"+personId, person);
log.info("new person {}", person);
}

}

0 comments on commit ba52cec

Please sign in to comment.