I am new in Apex Development.
I want to write a TestClass for my Apex Trigger.
I am sharing my code with you.
trigger UpdateContact on Account (after Insert) {
List <Contact> contactList=new List<Contact>();
for(Account a:Trigger.new)
{
Contact c=new Contact(LastName=a.Name, AccountId=a.id);
contactList.add(c);
}
insert contactList;
}