tests/testthat/test_retrieveSupportedObjectInformation.R

context("retrieveSupportedObjectInformation")

source('pathResolver.R')
source(file.path(computeRootPath(), 'code-samples', 'classes', 'sample-classes.R'))

test_that("retrieveSupportedObjectInformation", {
  expect_error(retrieveSupportedObjectInformation(NULL))
  expect_error(retrieveSupportedObjectInformation(Unknown()))

  expect_true(is.list(retrieveSupportedObjectInformation(Zorg())))
  expect_true(is.list(retrieveSupportedObjectInformation(Bu_S3())))
  expect_true(is.list(retrieveSupportedObjectInformation(new('Person_S4', name = 'neonira'))))
  expect_true(is.list(retrieveSupportedObjectInformation(new('Person_RC', name = 'neonira'))))
  expect_true(is.list(retrieveSupportedObjectInformation(Accumulator_R6$new())))
})

Try the wyz.code.offensiveProgramming package in your browser

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

wyz.code.offensiveProgramming documentation built on Sept. 25, 2023, 9:05 a.m.