+ Start a Discussion
Yogesh BiyaniYogesh Biyani 

load test data into string using Static Resource

I have created a class to parse text data and want to use Static Resource (text file) to import the data for testing. How do I use test.loaddata so that it is imported as a String?  
Yogesh BiyaniYogesh Biyani
I saw somewhere the following works so I am using it.
[SELECT Body FROM StaticResource WHERE Name = 'TextfortestingGetStringBetweenClass' ].Body.toString();