context("Testing Schema validation for XML file")
test_that("Validation returns valid for good XML file", {
mriFile = system.file("extdata", "testMRIZH.xml", package = "Dmrixml")
valid = ValidateMRIXML(mriFile)
expect_equal(valid,"valid")
})
test_that("Validation returns error messages for bad XML file", {
badMriFile = system.file("extdata", "testBadMRIZH.xml", package = "Dmrixml")
valid = ValidateMRIXML(badMriFile)
expect_true(length(valid)==5)
expect_true(substr(valid[5],1,7)=="Element")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.