Assert strings against a file content [message #1701665] |
Tue, 14 July 2015 15:08  |
Eclipse User |
|
|
|
Hi there,
I can not find a way to do this in a clean way, so I was wandering if anyone has any suggestion.
I have a functionality that based in some metadata creates a file in different formats: XML, JSON, CSV.
I want to create tests to assert how these files are created, so here is my issue: I have the expected result in a file in a Folder context, then I want to use a procedure to get the text from the control and assert against the file content
E.g:
proc "validate-mocked-file" [val fileContent]
{
get-view "Transform Message" | get-text-viewer | get-property text | equals $fileContent
}
But I couldn't find any way to read an XML file and use it as a parameter for the procedure. I believe there are no readers for different file types but CSV. I wanted to check if anyone knows if there is a better way to do this than paste the whole XML escaped in the Test script (which is very ugly).
Is this possible?
|
|
|
|
Powered by
FUDForum. Page generated in 0.04656 seconds