Created
August 17, 2020 04:12
-
-
Save yusufcakal/a05d015d67fbe3074f59ce69f1db9f53 to your computer and use it in GitHub Desktop.
SellerCenterServiceTest
This file contains hidden or 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 | |
public void shouldGetWorstSellerCenterLabelWhenSellerLabelOne() { | |
int sellCount = 3; | |
Seller seller = SellerBuilder.aSellerBuilder() | |
.sellCount(sellCount) | |
.previousSellerLabel(SellerLabel.SELLER_5) | |
.build(); | |
when(sellerLabelTwentyProcessor.getSellerLabel(sellCount)).thenReturn(SellerLabel.NEW_SELLER); | |
when(sellerLabelFiveProcessor.getSellerLabel(sellCount)).thenReturn(SellerLabel.NEW_SELLER); | |
when(sellerLabelOneProcessor.getSellerLabel(sellCount)).thenReturn(SellerLabel.SELLER_1); | |
SellerCenterLabel sellerCenterLabel = sellerCenterService.getSellerCenterLabel(seller); | |
verify(sellerLabelTwentyProcessor).getSellerLabel(sellCount); | |
verify(sellerLabelFiveProcessor).getSellerLabel(sellCount); | |
verify(sellerLabelOneProcessor).getSellerLabel(sellCount); | |
assertTrue(sellerCenterLabel.isSellerCenterLabelWorstSeller()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment