com.wesleyhome.test.jupiter.provider.datetime.LocalDateTimeRangeDataProvider.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.provider.datetime
import com.wesleyhome.test.jupiter.annotations.datetime.LocalDateTimeRangeSource
import com.wesleyhome.test.jupiter.step
import com.wesleyhome.test.jupiter.toLocalDateTime
import java.time.LocalDateTime
internal class LocalDateTimeRangeDataProvider :
AbstractAnnotatedDateTimeRangeDataProvider() {
override val formatPropertyName: String = "dateTimeFormat"
override fun toList(min: LocalDateTime, max: LocalDateTime, increment: String): List =
(min..max step increment).toList()
override fun convert(value: String, format: String): LocalDateTime = value.toLocalDateTime(format)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy