io.github.hellocuriosity.providers.ShortProvider.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of model-forge Show documentation
Show all versions of model-forge Show documentation
Model Forge is a library to automate model generation for automated testing.
The newest version!
package io.github.hellocuriosity.providers
/**
* Auto generates a Short between two values
*
* @param min minimum value
* @param max maximum value
* @param provider IntegerProvider
*
* @return Short instance
*/
class ShortProvider(
private val min: Int = Short.MIN_VALUE.toInt(),
private val max: Int = Short.MAX_VALUE.toInt(),
private val provider: IntegerProvider = IntegerProvider(min, max),
) : Provider {
override fun get(): Short = provider.get().toShort()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy