tests/testthat/test-default-plot-configuration.R

# DefaultPlotConfiguration

test_that("It stores new values when defaults are changed", {
  myPlotConfiguration <- DefaultPlotConfiguration$new()

  myNewTitle <- "My Plot Title"
  myNewPointSize <- 2.5
  myNewLegendTitle <- "My Legend Title"

  myPlotConfiguration$title <- myNewTitle
  myPlotConfiguration$pointsSize <- myNewPointSize
  myPlotConfiguration$legendTitle <- myNewLegendTitle

  expect_equal(myPlotConfiguration$title, myNewTitle)
  expect_equal(myPlotConfiguration$pointsSize, myNewPointSize)
  expect_equal(myPlotConfiguration$legendTitle, myNewLegendTitle)
})
Open-Systems-Pharmacology/OSPSuite-R documentation built on Feb. 14, 2025, 4:48 p.m.