use of org.neo4j.ogm.domain.satellites.Satellite in project neo4j-ogm by neo4j.
the class EntityAccessManagerTest method shouldRetrieveObjectAccessForWritingIterableObject.
@Test
public void shouldRetrieveObjectAccessForWritingIterableObject() {
ClassInfo classInfo = this.domainInfo.getClass(Program.class.getName());
FieldInfo iterableAccess = EntityAccessManager.getIterableField(classInfo, Satellite.class, "satellites", Relationship.Direction.OUTGOING);
assertThat(iterableAccess).as("The resultant object accessor shouldn't be null").isNotNull();
Program spaceProgramme = new Program();
iterableAccess.write(spaceProgramme, Arrays.asList(new Satellite()));
assertThat(spaceProgramme.getSatellites()).as("The satellites list wasn't set correctly").isNotNull();
assertThat(spaceProgramme.getSatellites().isEmpty()).as("The satellites list wasn't set correctly").isFalse();
}
Aggregations