48
48
public class BundleLoaderTest {
49
49
public static final BundleMetadata BUNDLE_METADATA =
50
50
new BundleMetadata ("bundle-1" , /* schemaVersion= */ 1 , new SnapshotVersion (Timestamp .now ()));
51
- private final BundleListener bundleListener ;
51
+ private final BundleCallback bundleCallback ;
52
52
53
53
private final Set <DocumentKey > lastDocuments ;
54
54
private final Map <String , ImmutableSortedSet <DocumentKey >> lastQueries ;
@@ -59,8 +59,8 @@ public BundleLoaderTest() {
59
59
lastQueries = new HashMap <>();
60
60
lastBundles = new HashMap <>();
61
61
62
- bundleListener =
63
- new BundleListener () {
62
+ bundleCallback =
63
+ new BundleCallback () {
64
64
65
65
@ Override
66
66
public ImmutableSortedMap <DocumentKey , MaybeDocument > applyBundledDocuments (
@@ -93,7 +93,7 @@ public void before() {
93
93
public void testLoadsDocuments () {
94
94
BundleLoader bundleLoader =
95
95
new BundleLoader (
96
- bundleListener , BUNDLE_METADATA , /* totalDocuments= */ 2 , /* totalBytes= */ 10 );
96
+ bundleCallback , BUNDLE_METADATA , /* totalDocuments= */ 2 , /* totalBytes= */ 10 );
97
97
98
98
LoadBundleTaskProgress progress =
99
99
bundleLoader .addElement (
@@ -138,7 +138,7 @@ public void testLoadsDocuments() {
138
138
public void testLoadsDeletedDocuments () {
139
139
BundleLoader bundleLoader =
140
140
new BundleLoader (
141
- bundleListener , BUNDLE_METADATA , /* totalDocuments= */ 1 , /* totalBytes= */ 10 );
141
+ bundleCallback , BUNDLE_METADATA , /* totalDocuments= */ 1 , /* totalBytes= */ 10 );
142
142
143
143
LoadBundleTaskProgress progress =
144
144
bundleLoader .addElement (
@@ -160,7 +160,7 @@ public void testLoadsDeletedDocuments() {
160
160
public void testAppliesDocumentChanges () {
161
161
BundleLoader bundleLoader =
162
162
new BundleLoader (
163
- bundleListener , BUNDLE_METADATA , /* totalDocuments= */ 1 , /* totalBytes= */ 5 );
163
+ bundleCallback , BUNDLE_METADATA , /* totalDocuments= */ 1 , /* totalBytes= */ 5 );
164
164
165
165
bundleLoader .addElement (
166
166
new BundledDocumentMetadata (
@@ -181,7 +181,7 @@ public void testAppliesDocumentChanges() {
181
181
public void testAppliesNamedQueries () {
182
182
BundleLoader bundleLoader =
183
183
new BundleLoader (
184
- bundleListener , BUNDLE_METADATA , /* totalDocuments= */ 2 , /* totalBytes= */ 4 );
184
+ bundleCallback , BUNDLE_METADATA , /* totalDocuments= */ 2 , /* totalBytes= */ 4 );
185
185
186
186
bundleLoader .addElement (
187
187
new BundledDocumentMetadata (
@@ -220,7 +220,7 @@ public void testAppliesNamedQueries() {
220
220
public void testVerifiesBundledDocumentMetadataSent () {
221
221
BundleLoader bundleLoader =
222
222
new BundleLoader (
223
- bundleListener , BUNDLE_METADATA , /* totalDocuments= */ 1 , /* totalBytes= */ 5 );
223
+ bundleCallback , BUNDLE_METADATA , /* totalDocuments= */ 1 , /* totalBytes= */ 5 );
224
224
try {
225
225
bundleLoader .addElement (new BundleDocument (doc ("coll/doc1" , 1 , map ())), /* byteSize= */ 5 );
226
226
fail ();
@@ -233,7 +233,7 @@ public void testVerifiesBundledDocumentMetadataSent() {
233
233
public void testVerifiesBundledDocumentMetadataMatches () {
234
234
BundleLoader bundleLoader =
235
235
new BundleLoader (
236
- bundleListener , BUNDLE_METADATA , /* totalDocuments= */ 1 , /* totalBytes= */ 5 );
236
+ bundleCallback , BUNDLE_METADATA , /* totalDocuments= */ 1 , /* totalBytes= */ 5 );
237
237
238
238
bundleLoader .addElement (
239
239
new BundledDocumentMetadata (
@@ -255,7 +255,7 @@ public void testVerifiesBundledDocumentMetadataMatches() {
255
255
public void testVerifiesDocumentFollowsMetadata () {
256
256
BundleLoader bundleLoader =
257
257
new BundleLoader (
258
- bundleListener , BUNDLE_METADATA , /* totalDocuments= */ 0 , /* totalBytes= */ 10 );
258
+ bundleCallback , BUNDLE_METADATA , /* totalDocuments= */ 0 , /* totalBytes= */ 10 );
259
259
260
260
bundleLoader .addElement (
261
261
new BundledDocumentMetadata (
@@ -279,7 +279,7 @@ public void testVerifiesDocumentFollowsMetadata() {
279
279
public void testVerifiesDocumentCount () {
280
280
BundleLoader bundleLoader =
281
281
new BundleLoader (
282
- bundleListener , BUNDLE_METADATA , /* totalDocuments= */ 2 , /* totalBytes= */ 10 );
282
+ bundleCallback , BUNDLE_METADATA , /* totalDocuments= */ 2 , /* totalBytes= */ 10 );
283
283
284
284
bundleLoader .addElement (
285
285
new BundledDocumentMetadata (
0 commit comments