You need to sign in to do that
Don't have an account?
Axaykumar Varu
Test method failure while inserting record from test method
Hi....All
I get test method failure while inserting record from testmethod
Test.startTest();
MyTest__c testobj = new MyTest__c(Fileld1 = 'test');
insert testobj;
ApexPages.StandardController controller = new ApexPages.StandardController(testobj);
MyClass mc = new MyClass(controller);
mc.save();
mc.cancel();
mc.stopTest();
Can you tell us what the error is?