Skip to content

Commit

Permalink
feat: add methods with defaults to SimulationConfig.scala (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
jigarkhwar authored Sep 27, 2024
1 parent 4cbe74d commit 1817b5d
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ object SimulationConfig {
def getDurationParam(path: String): FiniteDuration = simulationConfig.get[FiniteDuration](path)
def getBooleanParam(path: String): Boolean = simulationConfig.get[Boolean](path)

def getStringParam(path: String, default: String): String = simulationConfig.get[String](path, default)
def getIntParam(path: String, default: Int): Int = simulationConfig.get[Int](path, default)
def getDoubleParam(path: String, default: Double): Double = simulationConfig.get[Double](path, default)
def getDurationParam(path: String, default: FiniteDuration): FiniteDuration =
simulationConfig.get[FiniteDuration](path, default)
def getBooleanParam(path: String, default: Boolean): Boolean = simulationConfig.get[Boolean](path, default)

lazy val baseUrl: String = simulationConfig.get[String]("baseUrl")
lazy val baseAuthUrl: String = simulationConfig.get[String]("baseAuthUrl")
lazy val wsBaseUrl: String = simulationConfig.get[String]("wsBaseUrl")
Expand Down

0 comments on commit 1817b5d

Please sign in to comment.