org.junit.jupiter.params.provider.NullAndEmptySource Java Examples
The following examples show how to use
org.junit.jupiter.params.provider.NullAndEmptySource.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RadioButtonStepsTests.java From vividus with Apache License 2.0 | 5 votes |
@ParameterizedTest @NullAndEmptySource void testIfRadioOptionExistsEmptyOrNullForAttribute(String forAttribute) { mockRadioOptionLabelSearch(webElement); when(webElement.getAttribute(FOR)).thenReturn(forAttribute); radioButtonSteps.assertIfRadioOptionExists(RADIO_OPTION); verify(baseValidations).assertIfElementExists(RADIO_BUTTON, webElement, new SearchAttributes(ActionAttributeType.XPATH, "input[@type='radio']")); }
Example #2
Source File: BaseServiceImplTest.java From commercetools-sync-java with Apache License 2.0 | 5 votes |
@ParameterizedTest @NullAndEmptySource @ValueSource(strings = {" "}) void fetchCachedResourceId_WithBlankKey_ShouldMakeNoRequestAndReturnEmptyOptional(final String key) { //test final Optional<String> result = service.getIdFromCacheOrFetch(key).toCompletableFuture().join(); //assertions assertThat(result).isEmpty(); verify(client, never()).execute(any()); }
Example #3
Source File: BaseServiceImplTest.java From commercetools-sync-java with Apache License 2.0 | 5 votes |
@ParameterizedTest @NullAndEmptySource @ValueSource(strings = {" "}) void fetchResource_WithBlankKey_ShouldMakeNoRequestAndReturnEmptyOptional(final String key) { //test final Optional<Product> optional = service.fetchProduct(key).toCompletableFuture().join(); //assertions assertThat(optional).isEmpty(); verify(client, never()).execute(any()); }
Example #4
Source File: ReviewInputBuilderTest.java From sputnik with Apache License 2.0 | 5 votes |
@ParameterizedTest @NullAndEmptySource void shouldNotSetEmptyOrNullTag(String tag) { Configuration config = ConfigurationBuilder.initFromResource("test.properties"); Review review = ReviewBuilder.buildReview(config); ReviewInput reviewInput = reviewInputBuilder.toReviewInput(review, tag); assertThat(reviewInput.tag).isNull(); }
Example #5
Source File: ParameterizedArrayTestCase.java From quarkus with Apache License 2.0 | 4 votes |
@ParameterizedTest @NullAndEmptySource public void oneDimentionIntArrayArgument(int[] arg) { // the test only verifies that the test method is invoked successfully }
Example #6
Source File: ParameterizedArrayTestCase.java From quarkus with Apache License 2.0 | 4 votes |
@ParameterizedTest @NullAndEmptySource public void twoDimentionsIntArrayArgument(int[][] arg) { // the test only verifies that the test method is invoked successfully }
Example #7
Source File: ParameterizedArrayTestCase.java From quarkus with Apache License 2.0 | 4 votes |
@ParameterizedTest @NullAndEmptySource public void threeDimentionsIntArrayArgument(int[][][] arg) { // the test only verifies that the test method is invoked successfully }
Example #8
Source File: ParameterizedArrayTestCase.java From quarkus with Apache License 2.0 | 4 votes |
@ParameterizedTest @NullAndEmptySource public void oneDimensionStringArrayArgument(String[] arg) { // the test only verifies that the test method is invoked successfully }
Example #9
Source File: ParameterizedArrayTestCase.java From quarkus with Apache License 2.0 | 4 votes |
@ParameterizedTest @NullAndEmptySource public void twoDimensionsStringArrayArgument(String[][] arg) { // the test only verifies that the test method is invoked successfully }
Example #10
Source File: ParameterizedArrayTestCase.java From quarkus with Apache License 2.0 | 4 votes |
@ParameterizedTest @NullAndEmptySource public void threeDimensionsStringArrayArgument(String[][][] arg) { // the test only verifies that the test method is invoked successfully }