tests/testthat/test-getPreprocPlan.R

context("Function getPreprocPlan")

test_that("getPreprocPlan", {
  library(data.table)
  res <- getPreprocPlan(
    pathPtdfMatrixFactor = system.file(
      "testdata/plan_new_version_factor_AT.rds", package = "fbClust"),
    pathPtdfMatrixConstraint = system.file(
      "testdata/plan_new_version_constraint_AT.rds", package = "fbClust"))
  
  expect_true(all(grepl("ROW_ID|Period|Date|ram|^ptdf.{1,}$", colnames(res))))
  expect_true(nrow(res) == 2423)
  expect_true(all(grepl("^[0-9]{4}-[0-9]{2}-[0-9]{2}", res[['Date']])))
  
})
rte-antares-rpackage/fbClust documentation built on July 4, 2023, 12:06 a.m.