Skip to content

Commit

Permalink
remove duplicated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mslabek committed Nov 18, 2024
1 parent 01f949b commit b62efde
Showing 1 changed file with 0 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1024,22 +1024,6 @@ class InterpreterSpec extends AnyFunSuite with Matchers {
interpretProcess(process, Transaction()) shouldBe "someKey"
}

test("spel template ast operation parameter should work for template and literal value") {
val process = ScenarioBuilder
.streaming("test")
.source("start", "transaction-source")
.enricher(
"ex",
"out",
"templateAstOperationService",
"template" -> Expression.spelTemplate(s"Hello#{#input.msisdn}")
)
.buildSimpleVariable("result-end", resultVariable, "#out".spel)
.emptySink("end-end", "dummySink")

interpretProcess(process, Transaction(msisdn = "foo")) should equal("[Hello]-literal[foo]-templated")
}

test("spel template AST operation parameter should handle multiple cases") {
val testCases = Seq(
(
Expand Down Expand Up @@ -1086,38 +1070,6 @@ class InterpreterSpec extends AnyFunSuite with Matchers {
}
}

test("spel template ast operation parameter should work for single literal value") {
val process = ScenarioBuilder
.streaming("test")
.source("start", "transaction-source")
.enricher(
"ex",
"out",
"templateAstOperationService",
"template" -> Expression.spelTemplate("Hello")
)
.buildSimpleVariable("result-end", resultVariable, "#out".spel)
.emptySink("end-end", "dummySink")

interpretProcess(process, Transaction(msisdn = "foo")) should equal("[Hello]-literal")
}

test("spel template ast operation parameter should work for single templated function call expression") {
val process = ScenarioBuilder
.streaming("test")
.source("start", "transaction-source")
.enricher(
"ex",
"out",
"templateAstOperationService",
"template" -> Expression.spelTemplate("#{#input.msisdn.toString()}")
)
.buildSimpleVariable("result-end", resultVariable, "#out".spel)
.emptySink("end-end", "dummySink")

interpretProcess(process, Transaction(msisdn = "foo")) should equal("[foo]-templated")
}

}

class ThrowingService extends Service {
Expand Down

0 comments on commit b62efde

Please sign in to comment.