tyoshikawa1106のブログ

- Force.com Developer Blog -

SFDC:SOSLのテスト

SOSL処理のテストクラスを作成する際には "Test.setFixedSearchResults" を使用します。これを使用しないと検索結果を取得することができません。


実装時のイメージです。


詳細はこちら

Adding SOSL Queries to Unit Tests
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_testing_SOSL.htm