File: test_Soap.R

package info (click to toggle)
r-cran-rsdmx 0.5.7%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 940 kB
  • sloc: makefile: 2
file content (20 lines) | stat: -rw-r--r-- 630 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# test_SOAP.R
# Author: Emmanuel Blondel <emmanuel.blondel1@gmail.com>
#
# Description: Unit tests for SDMX SOAP responses
#=======================
require(rsdmx, quietly = TRUE)
require(testthat)
context("SDMXSoapResponse")

test_that("SOAP - CompactData",{
  file <- system.file("extdata", "SDMX_SOAP_Example.xml", package = "rsdmx")
  xmlObj <- xmlParse(file)
  ns <- namespaces.SDMX(xmlObj)
  expect_true(isSoapRequestEnvelope(xmlObj, ns))
  xmlObj <- getSoapRequestResult(xmlObj)
  expect_false(isSoapRequestEnvelope(xmlObj, ns))
  
  ds <- SDMXCompactData(xmlObj, ns)
  expect_is(ds, "SDMXCompactData")
})