tests/testthat/test_ISOFeatureOperation.R

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

context("ISOFeatureOperation")

test_that("encoding",{
  
  #encoding
  md <- ISOFeatureOperation$new()
  md$setMemberName("name")
  md$setDefinition("definition")
  md$setCardinality(lower=1,upper=1)
  md$setSignature("signature")
  md$setFormalDefinition("def")
  expect_is(md, "ISOFeatureOperation")
  xml <- md$encode()
  expect_is(xml, "XMLInternalNode")
  
  #decoding
  md2 <- ISOFeatureOperation$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 Aug. 22, 2018, 5:03 p.m.