use of org.springframework.cloud.gcp.data.datastore.core.convert.TwoStepsConversions in project spring-cloud-gcp by spring-cloud.
the class GqlDatastoreQueryTests method initMocks.
@Before
public void initMocks() {
this.queryMethod = mock(DatastoreQueryMethod.class);
this.datastoreTemplate = mock(DatastoreTemplate.class);
this.datastoreEntityConverter = mock(DatastoreEntityConverter.class);
this.readWriteConversions = new TwoStepsConversions(new DatastoreCustomConversions(), null, this.datastoreMappingContext);
when(this.datastoreTemplate.getDatastoreEntityConverter()).thenReturn(this.datastoreEntityConverter);
when(this.datastoreEntityConverter.getConversions()).thenReturn(this.readWriteConversions);
this.evaluationContextProvider = mock(QueryMethodEvaluationContextProvider.class);
}
use of org.springframework.cloud.gcp.data.datastore.core.convert.TwoStepsConversions in project spring-cloud-gcp by spring-cloud.
the class PartTreeDatastoreQueryTests method initMocks.
@Before
public void initMocks() {
this.queryMethod = mock(DatastoreQueryMethod.class);
when(this.queryMethod.getReturnedObjectType()).thenReturn((Class) TestEntity.class);
this.datastoreTemplate = mock(DatastoreTemplate.class);
this.datastoreMappingContext = new DatastoreMappingContext();
this.datastoreEntityConverter = mock(DatastoreEntityConverter.class);
this.readWriteConversions = new TwoStepsConversions(new DatastoreCustomConversions(), null, this.datastoreMappingContext);
when(this.datastoreTemplate.getDatastoreEntityConverter()).thenReturn(this.datastoreEntityConverter);
when(this.datastoreEntityConverter.getConversions()).thenReturn(this.readWriteConversions);
}
Aggregations