Skip to content

Instantly share code, notes, and snippets.

@jurberg
Created November 11, 2012 20:12
Show Gist options
  • Save jurberg/4056102 to your computer and use it in GitHub Desktop.
Save jurberg/4056102 to your computer and use it in GitHub Desktop.
Convert XML to Flat File Test
def sep = System.getProperty('line.separator')
def expected =
"bk101Gambardella Matthew " + sep +
"bk102Ralls Kim " + sep +
"bk103Corets Eva " + sep
void testParsing() {
def books = new XmlSlurper().parseText(data)
assertEquals expected, xmlToFlatFile(books, 'book', mapping)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment