-
-
Save arun12209/27315ce12961bedc511b33bcdae284e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@isTest | |
public class MyTestClass { | |
static testMethod void testMyMethod() { | |
List<Account> accounts = new List<Account>{ | |
new Account(Name='Test Account 1'), | |
new Account(Name='Test Account 2') | |
}; | |
insert accounts; | |
Test.setFixedSearchResults(accounts); | |
List<Account> results = [FIND 'Test Account*' IN ALL FIELDS RETURNING Account(Name)]; | |
System.assertEquals(2, results.size()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment