tests/testthat/test_ISOStandardOrderProcess.R

# test_ISOStandardOrderProcess.R
# Author: Emmanuel Blondel <[email protected]>
#
# Description: Unit tests for ISOStandardOrderProcess.R
#=======================
require(geometa, quietly = TRUE)
require(testthat)

context("ISOStandardOrderProcess")

test_that("encoding",{
  
  #encoding
  md <- ISOStandardOrderProcess$new()
  md$setFees("fees")
  md$setPlannedAvailableDateTime(ISOdate(2017,7,5,12,0,0))
  md$setOrderingInstructions("instructions")
  md$setTurnaround("turnaround")
  
  xml <- md$encode()
  expect_is(xml, "XMLInternalNode")
  
  #decoding
  md2 <- ISOStandardOrderProcess$new(xml = xml)
  xml2 <- md2$encode()
  
  expect_true(ISOAbstractObject$compare(md, md2))
  
})

Try the geometa package in your browser

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

geometa documentation built on Nov. 28, 2017, 5:05 p.m.