I am playing around SFDC and wrote a trigger to count the total Contacts in the system. I wrote the test class and when I am trying to save the class I get the following error:
Error: Compile Error: Expression cannot be assigned at line -1 column -1
This is my test class:
@isTest
public class TestCountContacts{
static testMethod void TestCountcontacts(){
Contact newContact = new Contact();
Contact.FirstName = 'John';
Contact.LastName = 'Jones';
insert newContact;
List<Contact> total = [SELECT Id From Contact];
System.assetEquals(total.size(),1);
}
}