tests/testthat/test_InOperator.R

# Testing InOperator
test_that("InOperator returns correct structure", {
  attribute <- "rcsb_entity_source_organism.taxonomy_lineage.name"
  value <- c("Homo sapiens", "Mus musculus")
  result <- InOperator(attribute, value)
  expect_equal(result$attribute, attribute)
  expect_equal(result$value, value)
  expect_equal(result$operator, "in")
  expect_s3_class(result, "InOperator")
})

Try the rPDBapi package in your browser

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

rPDBapi documentation built on Oct. 19, 2024, 5:08 p.m.