tests/testthat/test_ContainsPhraseOperator.R

# Testing ContainsPhraseOperator
test_that("ContainsPhraseOperator returns correct structure", {
  attribute <- "rcsb_primary_citation.title"
  value <- "molecular dynamics"
  result <- ContainsPhraseOperator(attribute, value)
  expect_equal(result$attribute, attribute)
  expect_equal(result$value, value)
  expect_equal(result$operator, "contains_phrase")
  expect_s3_class(result, "ContainsPhraseOperator")
})

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.