tests/testthat/testFacet.R

context("Facet plot")

krasPlate <- ddpcrPlate(KRASdata)

test_that("Facet plot gives a output with correct parameters", {
  expect_s3_class(facetPlot(krasPlate), c("gg", "ggplot"))
  expect_s3_class(facetPlot(krasPlate, cMethod=NULL), c("gg", "ggplot"))
  expect_s3_class(facetPlot(krasPlate, cMethod="Cluster"), c("gg", "ggplot"))
  expect_equal(facetPlot(krasPlate), facetPlot(krasPlate, cMethod=NULL))
})

test_that("Facet plot fails when plotting the wrong column", {
  expect_error(facetPlot(krasPlate, cMethod="Well"))
  expect_error(facetPlot(krasPlate, cMethod="AAA"))
})

Try the twoddpcr package in your browser

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

twoddpcr documentation built on Nov. 8, 2020, 5:49 p.m.