Test Class:
In the previous post I have posted one Before Trigger .For that Trigger the test class is given Below.
Test Class Code:
@IsTest
In the previous post I have posted one Before Trigger .For that Trigger the test class is given Below.
Test Class Code:
@IsTest
private class Account_Trigger_Test
{
private static testMethod void testDelete()
{
Account acc=new Account(Name='Test Account;);
insert acc;
// should succeed
delete acc;
}
private static testMethod void testDeleteFail()
{
Account acc=new Account(Name='Test Account',
Client_ID__c='Should fail');
insert acc;
try
{
delete acc;
// should throw an exception - the following assertion will cause an error if the code carries on
System.assert(false);
}
catch (DMLException e)
{
// expected - could assert the message here
}
}
}
9A0BD411B4
ReplyDeletekiralık hacker
hacker arıyorum
belek
kadriye
serik
AE61509F
ReplyDeleteesçort tunceli
urfa esçort
karatay esçort
esçort bayan antep
İzmit esçort
ergani esçort
dilovası esçort
serik esçort
çatalca esçort
91F5AC3A
ReplyDeleteBodrum
Elbistan
Girne
Bandırma
Kundu
Side
Reyhanlı
Tarsus
Foça