function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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();