File: test_CrossSectionalData.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 (19 lines) | stat: -rw-r--r-- 611 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
# test_CrossSectionalData.R
# Author: Emmanuel Blondel <emmanuel.blondel1@gmail.com>
#
# Description: Unit tests for SDMX CrossSectionalData methods
#=======================
require(rsdmx, quietly = TRUE)
require(testthat)
context("SDMXCrossSectionalData")

test_that("CrossSectionalData 1.0",{
  file <- system.file("extdata", "SDMXCrossSectionalDataExample_1.0.xml", package = "rsdmx")
  xmlObj <- xmlParse(file)
  ns <- namespaces.SDMX(xmlObj)
  ds <- SDMXCrossSectionalData(xmlObj, ns)
  expect_is(ds, "SDMXCrossSectionalData")
  
  df <- as.data.frame(ds)
  expect_is(df, "data.frame")
})