com.rapatao.projects.ruleset.engine.cases.TestData.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tests Show documentation
Show all versions of tests Show documentation
Simple yet powerful rules engine that offers the flexibility of using the built-in engine and creating a custom one.
The newest version!
package com.rapatao.projects.ruleset.engine.cases
import java.math.BigDecimal
object TestData {
data class RequestData(
val item: Item,
)
data class Item(
val price: BigDecimal,
val trueValue: Boolean = true,
val falseValue: Boolean = false,
val name: String,
val tags: List,
val arrTags: Array,
val nullableStr: String? = null,
)
val inputData = RequestData(
item = Item(
name = "product name",
price = BigDecimal.TEN,
tags = listOf(
"test", "brand-new"
),
arrTags = arrayOf("in_array")
)
)
fun cases() =
ExpressionCases.cases() +
MatcherCases.cases() +
OperatorWithCases.cases() +
ContainsCases.cases()
}