tests/testthat/test-addCongestionLink.R

context("addCongestionLink")

sapply(studyPathS, function(studyPath){

  opts <- setSimulationPath(studyPath)

  dt <- readAntares(links = "all")
  dt <- addCongestionLink(dt)



  expect_true(all(c("congestionFrequencyDirect", "congestionFrequencyIndirect", "congestionHoursDirect",
  "congestionHoursIndirect") %in%  names(dt)))

  expect_error(addCongestionLink(data.table()))
  expect_error(addCongestionLink(dt[, .SD, .SDcols = 1]))

})

Try the antaresProcessing package in your browser

Any scripts or data that you put into this service are public.

antaresProcessing documentation built on Nov. 7, 2021, 1:06 a.m.