All Downloads are FREE. Search and download functionalities are using the official Maven repository.

junitparams.converters.Nullable Maven / Gradle / Ivy

There is a newer version: 1.1.1
Show newest version

package junitparams.converters;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import junitparams.Parameters;

/**
 * Allows test null values defined as a String array in {@link Parameters} 
 * 
 * @author Peter Jurkovic
 * 
 * 

* Example: *

 * {@literal @}Test
 * {@literal @}Parameters({" null "})
 * public void shouldBeNull({@literal @}Nullable String value) {
 *     assertThat(value).isNull();
 * }
 * 
*

*/ @Retention(RetentionPolicy.RUNTIME) @Param(converter = NullableConverter.class) @Target({ElementType.ANNOTATION_TYPE, ElementType.PARAMETER}) public @interface Nullable { /** * Defines parameter value which will be replaced by Java null */ String nullIdentifier() default "null"; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy