Created
June 21, 2019 05:48
-
-
Save enesacikoglu/782af51d94ac4f027d2915fef6dfc0b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
fun `🙈 it_should_get_campaign_stocks 🙈 `() { | |
//Arrange | |
val campaignId = 1L | |
val listOfStockDto = ListOfStockDto("1", StockChannel.FT) | |
val listOfStocks = Arrays.asList(listOfStockDto) | |
val body = CampaignStockListResponse(1L, DateUtil.now(), DateUtil.now(), listOfStocks) | |
val response = ResponseEntity.ok(body) | |
given<ResponseEntity<CampaignStockListResponse?>>(campaignApiClient.getStocks(campaignId)).willReturn(response) | |
//Act | |
val stocks = campaignApiService.getStocks(campaignId) | |
//Assert | |
assertThat<ListOfStockDto>(stocks.body!!.listOfStock).containsExactlyInAnyOrder(listOfStockDto) | |
verify(campaignApiClient).getStocks(campaignId) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment