tests/testthat/test_RangeOperator.R

# Testing RangeOperator
test_that("RangeOperator returns correct structure", {
  attribute <- "rcsb_entry_info.resolution_combined"
  from_value <- 1.5
  to_value <- 2.5
  result <- RangeOperator(attribute, from_value, to_value)
  expect_equal(result$attribute, attribute)
  expect_equal(result$value$from, from_value)
  expect_equal(result$value$to, to_value)
  expect_equal(result$operator, "range")
  expect_s3_class(result, "RangeOperator")
})

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.