Skip to content

Commit 4a7cf36

Browse files
committed
Extend database tests in sample app
1 parent 4307590 commit 4a7cf36

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Source/sample/src/main/java/im/delight/android/ddp/examples/MainActivity.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,10 @@ public void onDestroy() {
168168
mMeteor.handleMessage("{\"msg\":\"added\",\"collection\":\"people\",\"id\":\"bo\",\"fields\":{\"name\":\"Bob\",\"age\":27,\"gender\":\"m\",\"location\":{\"country\":\"Spain\",\"region\":\"Andalusia\"}}}");
169169
mMeteor.handleMessage("{\"msg\":\"added\",\"collection\":\"people\",\"id\":\"ca\",\"fields\":{\"name\":\"Carol\",\"age\":29,\"gender\":null,\"location\":null}}");
170170
mMeteor.handleMessage("{\"msg\":\"added\",\"collection\":\"people\",\"id\":\"ev\",\"fields\":{\"name\":\"Eve\",\"age\":31,\"gender\":\"f\",\"location\":{\"country\":\"Australia\",\"region\":null}}}");
171+
mMeteor.handleMessage("{\"msg\":\"added\",\"collection\":\"settings\",\"id\":\"5h2iJyPMZmDTaSwGC\",\"fields\":{\"appId\":\"92Hn8HKvatWDPP22u\",\"endpoint\":\"http://www.example.com/\",\"clientDelay\":10000,\"enableSomething\":true}}");
172+
mMeteor.handleMessage("{\"msg\":\"added\",\"collection\":\"companies\",\"id\":\"31c53bca49616e773567920d\",\"fields\":{\"owner\":null,\"isInProgress\":true,\"Description\":\"Acme Inc. is a company\",\"Company\":\"Acme Inc.\",\"Location\":\"Some city, Some country\",\"Region\":\"SomeContinent/SomeOtherContinent\",\"Logo\":\"/assets/i/companies/default-logo.png\",\"Type\":\"Things\",\"Website\":\"http://www.example.com/\",\"prime\":false}}");
173+
mMeteor.handleMessage("{\"msg\":\"added\",\"collection\":\"versions\",\"id\":\"JyPMZ49616e7735\",\"fields\":{\"version\":\"ae976571be8a6999984eae9da24fc5d948ca80ac\",\"assets\":{\"allCss\":[{\"url\":\"/main.css\"}]}}}");
174+
mMeteor.handleMessage("{\"msg\":\"added\",\"collection\":\"events\",\"id\":\"2H7ZDva9nhL4F42im\",\"fields\":{\"coords\":{\"type\":\"Point\",\"coordinates\":[1.23,-2.345]},\"events\":[{\"eventId\":\"946221490\",\"eventName\":\"Meteor 101\",\"eventUrl\":\"http://www.example.com/946221490\",\"eventTime\":1000000000000,\"eventUTCOffset\":-3600000}],\"groupId\":2018074068,\"groupName\":\"Meteor 101 A\",\"groupUrlname\":\"Meteor-101-A\"}}");
171175
172176
// mock some data that is being changed
173177
mMeteor.handleMessage("{\"msg\":\"changed\",\"collection\":\"people\",\"id\":\"ev\",\"fields\":{\"age\":23,\"location\":{\"region\":\"New South Wales\"}},\"cleared\":{\"gender\":null}}");

0 commit comments

Comments
 (0)