You need to sign in to do that
Don't have an account?

Debug logs for test class
How to check my values using debug logs statement in Test class..Here is my test class code
Test class:
static testmethod void test_1(){
Account acc= new Account();
acc.Name='Test';
acc.Type='Customer';
insert acc;
Contact con = new Contact();
con.LastName='TestUser';
con.Email='testUser@test.com';
con.AccountId=acc.id;
insert con ;
opportunity opty = new opportunity();
opty.Name='test';
opty.CloseDate=system.today();
opty.StageName='Advanced';
opty.AccountId=acc.id;
opty.Customer_Contact__c=con.id;
insert opty;
system.debug('opp' +opty);
Test.startTest();
ApexPages.StandardController sc = new ApexPages.StandardController(opty);
oppexstn testoppexstn = new oppexstn(sc);
Test.stopTest();
}
I cant find this debug log text 'opp' in my debug logs statement.
Thanks
Raj
Test class:
static testmethod void test_1(){
Account acc= new Account();
acc.Name='Test';
acc.Type='Customer';
insert acc;
Contact con = new Contact();
con.LastName='TestUser';
con.Email='testUser@test.com';
con.AccountId=acc.id;
insert con ;
opportunity opty = new opportunity();
opty.Name='test';
opty.CloseDate=system.today();
opty.StageName='Advanced';
opty.AccountId=acc.id;
opty.Customer_Contact__c=con.id;
insert opty;
system.debug('opp' +opty);
Test.startTest();
ApexPages.StandardController sc = new ApexPages.StandardController(opty);
oppexstn testoppexstn = new oppexstn(sc);
Test.stopTest();
}
I cant find this debug log text 'opp' in my debug logs statement.
Thanks
Raj
I hope this helps,
Cheers
John