tests/testthat/test_ContainsWordsOperator.R

# Testing ContainsWordsOperator
test_that("ContainsWordsOperator returns correct structure", {
  attribute <- "rcsb_primary_citation.title"
  value <- "crystal structure"
  result <- ContainsWordsOperator(attribute, value)
  expect_equal(result$attribute, attribute)
  expect_equal(result$value, value)
  expect_equal(result$operator, "contains_words")
  expect_s3_class(result, "ContainsWordsOperator")
})

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.