Skip to content

Instantly share code, notes, and snippets.

View r4jiv007's full-sized avatar
🎯
Focusing

Rajiv Singh r4jiv007

🎯
Focusing
View GitHub Profile
{ "categorys":[ { "id":"26576", "name":"Appeteasers", "position":"0", "menu-items":[ { "id":"94298", "name":"3 Chicken Wings", "position":1, "description":"Tender, Spicy and Juicy. Original or Peri-Crusted", "images":[ ], "sub-items":[ { "id":"224471", "name":"3 Chicken Wings", "position":1, "price":"250.00", "consumable":"1:1", "cuisine_name":"Indian", "category_name":"Appeteasers", "discount":{ "type":"", "amount":"0.00" }, "tags":[ ] } ] }, { "id":"94301", "name":"Chicken Livers and Portuguese Roll", "position":2, "description":"Chicken Livers Topped with PERi-PERi Sauce, Served with A Roll To Soak Up The Sauce", "images":[ ], "sub-items":[ { "id":"224474", "name":"Chicken Livers and Portuguese Roll", "position":1, "price":"250.00", "consumable":"1:1", "cuisine_name":"Indian", "category_name":"Appeteasers", "discount":{ "type":"", "amount":"0.00" }, "tags":[ ] } ] }, { "id":"94304", "name":"Spicy Mixed Olives (V)", "position":3, "description":"Co-Starring Garlic, Pepper and Chili", "images":[ ], "sub-items
@Test
fun test_polling_behaviour() {
Mockito.`when`(dataManager.getMatch(Mockito.anyInt())).thenReturn(
just(matchResponse))
Mockito.`when`(matchResponse.match()).thenReturn(mMatch)
val testScheduler = TestScheduler()
mSpyPresenter.setMatch(mMatch)
val testObserver = mSpyPresenter.getPollingObservable(MATCH_UPDATE_INTERVAL, testScheduler, testScheduler)
.subscribeOn(testScheduler)
.observeOn(testScheduler)