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 (seeAllData = true) | |
public class SOQLqueries { | |
static testMethod void SOQLandCollections(){ | |
//This only works when this test Class is set to SeeAllData=True! | |
List<Account> accts = [SELECT ID FROM Account]; | |
System.debug(accts.size()); | |
System.debug(accts); | |
//System.debug(accts[0].Name);//This won't work because Name was not acquired in the query. | |
accts = [SELECT ID, Name, Phone, BillingState FROM Account]; |