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
public class Bouncer { | |
private final EntranceChecker entranceChecker; | |
public Bouncer(EntranceChecker entranceChecker) { | |
this.entranceChecker = entranceChecker; | |
} | |
public boolean shouldBlock(Person person) { | |
return !entranceChecker.isInTheGuestList(person); | |
} |
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
@RunWith(MockitoJUnitRunner.class) | |
public class BouncerTest { | |
@Mock | |
private EntranceChecker mockEntranceChecker; | |
@Mock | |
private Person mockInListPerson; | |
@Mock | |
private Person mockNotInListPerson; |
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
@RunWith(MockitoJUnitRunner.class) | |
public class BouncerTest { | |
@Mock | |
private EntranceChecker entranceChecker; | |
private Bouncer bouncer; | |
@Mock | |
Person inListPerson; | |
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
public class EntranceChecker { | |
private final Set<String> names; | |
public EntranceChecker(Set<String> names) { | |
this.names = names; | |
} | |
boolean isInTheGuestList(Person person) { | |
if(person == null) { | |
return true; | |
} |
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
public class EntranceChecker { | |
private final Set<String> names; | |
public EntranceChecker(Set<String> names) { | |
this.names = names; | |
} | |
public boolean isInTheGuestList(Person person) { | |
if(person == null) { | |
return true; | |
} |
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
client_code_version | cnt_20 | cnt_21 | cnt_22 | cnt_23 | cnt_24 | cnt_25 | cnt_26 | cnt_27 | cnt_28 | cnt_29 | cnt_30 | cnt_31 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8.43.0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 169084 | 313426 | 304943 | 296302 | |
8.42.0 | 0 | 0 | 175167 | 337907 | 401083 | 362409 | 388085 | 412845 | 132041 | 2487 | 1498 | 881 | |
8.41.0 | 327918 | 298443 | 132229 | 2873 | 1436 | 877 | 562 | 474 | 408 | 324 | 318 | 218 | |
8.40.0 | 497 | 405 | 390 | 269 | 210 | 151 | 146 | 122 | 98 | 90 | 79 | 74 | |
8.39.0 | 57 | 61 | 40 | 40 | 38 | 25 | 26 | 16 | 13 | 8 | 13 | 5 | |
8.38.1 | 45 | 38 | 37 | 36 | 23 | 24 | 24 | 19 | 11 | 8 | 21 | 11 | |
8.38.0 | 6 | 2 | 2 | 6 | 4 | 3 | 3 | 1 | 1 | 1 | 0 | 0 | |
8.37.1 | 1 | 1 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
8.37.0 | 25 | 13 | 32 | 29 | 28 | 30 | 18 | 7 | 7 | 8 | 22 | 13 |