發表文章

目前顯示的是 12月 2, 2018的文章

Writing Cucumber scenarios for reactive code

圖片
up vote 1 down vote favorite I am very new to BDD, and having a bit of trouble outlining the scenarios for some code that I wrote. The code basically queries a Couchbase bucket for abandoned orders, and then calls a cancel order API to cancel those orders. For each call to the cancel order API, it calls another service to generate access token. The entire code has been written in RxJava. In case of errors, I have fallback observables in place (for example, should anything go awry while querying Couchbase, it fallbacks to an empty observable). I have similar fallbacks in other places in the code as well. I want to write Cucumber scenarios for my code. But I can't figure out how to go about it. For example, should I assume that the service has a valid access token and an orderId to cancel (querying CB returns a bunch of orderIds that need to be passed on to the cancel order API along with an access token)? Ideally, I should be testing the following: Querying Couchbase fai

1988 NBA Finals

圖片
1988 NBA Finals Team Coach Wins Los Angeles Lakers Pat Riley 4 Detroit Pistons Chuck Daly 3 Dates June 7–21 MVP James Worthy (Los Angeles Lakers) Television CBS (U.S.) Announcers Dick Stockton and Billy Cunningham Radio network KLAC (LAL) WCXI (DET) Announcers Chick Hearn and Stu Lantz (LAL) George Blaha, Fred McLeod and Dick Motta (DET) Referees Game 1: Darell Garretson and Joe Crawford Game 2: Ed T. Rush and Jess Kersey Game 3: Earl Strom and Hugh Evans Game 4: Jake O'Donnell and Jack Madden Game 5: Darell Garretson and Joe Crawford Game 6: Hugh Evans and Ed T. Rush Game 7 Earl Strom and Jake O'Donnell Hall of Famers Pistons: Adrian Dantley (2008) Joe Dumars (2006) Dennis Rodman (2011) Isiah Thomas (2000) Lakers: Kareem Abdul-Jabbar (1995) Magic Johnson (2002) James Worthy (2003) Coaches: Chuck Daly (1994) Pat Riley (2008) Officials: Darell Garretson (2016) Earl Strom (1995) Eastern Finals Pistons defeat Celtics, 4–2 Western Finals Lakers defeat Mavericks, 4–3  < 1987 NB