com.wesleyhome.test.jupiter.annotations.datetime.LocalDateSource.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of junit-jupiter-params-generated Show documentation
Show all versions of junit-jupiter-params-generated Show documentation
Library to help generate test parameter permutations for parameterized tests in JUnit.
This version is an initial attempt to convert to building with Gradle.
The newest version!
package com.wesleyhome.test.jupiter.annotations.datetime
import com.wesleyhome.test.jupiter.annotations.ext.SourceProvider
import com.wesleyhome.test.jupiter.provider.datetime.LocalDateValueSourceDataProvider
/**
* Annotation to indicate that the annotated LocalDate parameter should be populated with a random value from the provided
* [values] array.
*
* @sample examples.LocalDateSource.example
*/
@Target(AnnotationTarget.VALUE_PARAMETER)
@Retention(AnnotationRetention.RUNTIME)
@SourceProvider(LocalDateValueSourceDataProvider::class)
@MustBeDocumented
annotation class LocalDateSource(
/**
* The array of possible values to use for the random date.
* @return the array of possible values
* @see java.time.LocalDate.parse
* @see java.time.format.DateTimeFormatter
*/
val values: Array,
/**
* The format to use when parsing the date string.
* @return the date format
* @see java.time.format.DateTimeFormatter
*/
val dateFormat: String = "yyyy-MM-dd"
)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy