com.wesleyhome.test.jupiter.Progressions.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
import com.wesleyhome.test.jupiter.provider.InstantProgression
import com.wesleyhome.test.jupiter.provider.LocalDateProgression
import com.wesleyhome.test.jupiter.provider.LocalDateTimeProgression
import com.wesleyhome.test.jupiter.provider.LocalTimeProgression
import com.wesleyhome.test.jupiter.provider.number.DoubleProgression
import com.wesleyhome.test.jupiter.provider.number.FloatProgression
import java.time.Instant
import java.time.LocalDate
import java.time.LocalDateTime
import java.time.LocalTime
internal infix fun ClosedFloatingPointRange.step(step: Float): FloatProgression {
return FloatProgression(this.start, this.endInclusive, step)
}
internal infix fun ClosedRange.step(step: String): LocalDateTimeProgression {
return LocalDateTimeProgression(this.start, this.endInclusive, step.temporalAmount())
}
internal infix fun ClosedRange.step(step: String): LocalDateProgression {
return LocalDateProgression(this.start, this.endInclusive, step.temporalAmount())
}
internal infix fun ClosedRange.step(step: String): LocalTimeProgression {
return LocalTimeProgression(this.start, this.endInclusive, step.temporalAmount())
}
internal infix fun ClosedRange.step(step: String): InstantProgression {
return InstantProgression(this.start, this.endInclusive, step.temporalAmount())
}
internal infix fun ClosedFloatingPointRange.step(step: Double): DoubleProgression {
return DoubleProgression(this.start, this.endInclusive, step)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy