tests/testthat/test_ComparisonOperator.R

# Testing ComparisonOperator
test_that("ComparisonOperator returns correct structure", {
  attribute <- "rcsb_entry_info.resolution_combined"
  value <- 2.0
  comparison_type <- "EQUAL"
  result <- ComparisonOperator(attribute, value, comparison_type)
  expect_equal(result$attribute, attribute)
  expect_equal(result$value, value)
  expect_equal(result$operator, "equals")
  expect_s3_class(result, "ComparisonOperator")
})

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.