All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.rapatao.projects.ruleset.engine.cases.TestData.kt Maven / Gradle / Ivy

Go to download

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()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy