Skip to content

Commit

Permalink
refactor: Migrate to new test style
Browse files Browse the repository at this point in the history
  • Loading branch information
saig0 committed Aug 20, 2024
1 parent c967208 commit 1ba21ca
Show file tree
Hide file tree
Showing 2 changed files with 366 additions and 311 deletions.
31 changes: 28 additions & 3 deletions src/test/scala/org/camunda/feel/impl/FeelEngineTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,26 @@
*/
package org.camunda.feel.impl

import org.camunda.feel.{
Date,
DateTime,
DayTimeDuration,
LocalDateTime,
LocalTime,
Time,
YearMonthDuration
}
import org.camunda.feel.api.{
EvaluationResult,
FailedEvaluationResult,
FeelEngineApi,
FeelEngineBuilder,
SuccessfulEvaluationResult,
FailedEvaluationResult
SuccessfulEvaluationResult
}
import org.camunda.feel.context.Context
import org.camunda.feel.syntaxtree.ValFunction
import org.camunda.feel.syntaxtree.{ValFunction, ZonedTime}

import java.time.{Duration, LocalDate, LocalDateTime, LocalTime, Period, ZonedDateTime}

trait FeelEngineTest {

Expand Down Expand Up @@ -97,4 +108,18 @@ trait FeelEngineTest {
}
}

def date(x: String): Date = LocalDate.parse(x)

def localTime(x: String): LocalTime = LocalTime.parse(x)

def time(x: String): Time = ZonedTime.parse(x)

def dateTime(x: String): DateTime = ZonedDateTime.parse(x)

def localDateTime(x: String): LocalDateTime = LocalDateTime.parse(x)

def yearMonthDuration(x: String): YearMonthDuration = Period.parse(x)

def dayTimeDuration(x: String): DayTimeDuration = Duration.parse(x)

}
Loading

0 comments on commit 1ba21ca

Please sign in to comment.