Skip to content

Commit 71f0150

Browse files
committed
fix tests
1 parent 70f3ccb commit 71f0150

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

core/src/test/java/io/snabble/sdk/ProductDatabaseTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public void testFindBySkuOnlineWithShopSpecificPrice() throws Throwable {
176176
assertEquals(product.getSku(), "1");
177177
assertEquals(product.getListPrice(), 399);
178178

179-
project.setCheckedInShop(project.getShops()[1]);
179+
project.setCheckedInShop(project.getShops().get(1));
180180
final Product product2 = findBySkuBlocking(productDatabase, "1");
181181
assertEquals(product2.getSku(), "1");
182182
assertEquals(product2.getListPrice(), 299);
@@ -190,7 +190,7 @@ public void testFindBySkuWithShopSpecificPrice() {
190190
assertEquals(product.getSku(), "salfter-classic");
191191
assertEquals(product.getListPrice(), 100);
192192

193-
project.setCheckedInShop(project.getShops()[2]);
193+
project.setCheckedInShop(project.getShops().get(2));
194194
final Product product2 = productDatabase.findBySku("salfter-classic");
195195
assertEquals(product2.getSku(), "salfter-classic");
196196
assertEquals(product2.getListPrice(), 200);
@@ -430,14 +430,14 @@ public void error() {
430430
@Test
431431
public void testMultiplePricingCategories() throws IOException, Snabble.SnabbleException {
432432
withDb("test_1_25.sqlite3");
433-
project.setCheckedInShop(project.getShops()[3]);
433+
project.setCheckedInShop(project.getShops().get(3));
434434

435435
ProductDatabase productDatabase = project.getProductDatabase();
436436
Product product = productDatabase.findBySku("multiple-categories");
437437
Assert.assertNotNull(product);
438438
Assert.assertEquals(product.getListPrice(), 83);
439439

440-
project.setCheckedInShop(project.getShops()[1]);
440+
project.setCheckedInShop(project.getShops().get(1));
441441

442442
productDatabase = project.getProductDatabase();
443443
product = productDatabase.findBySku("multiple-categories");

core/src/test/java/io/snabble/sdk/SnabbleSdkTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,6 @@ public void testSdkInitialization() {
203203

204204
Assert.assertNotNull(appDbUrl);
205205
Assert.assertTrue(project.getProductDatabase().getRevisionId() > 0);
206-
Assert.assertTrue(project.getShops().length > 0);
206+
Assert.assertTrue(project.getShops().size() > 0);
207207
}
208208
}

0 commit comments

Comments
 (0)