You need to sign in to do that
Don't have an account?
prasanth kumar
test class on account is not working . pleas help
i wote a apex class and test class. no errors are showing. when i click on run test. then it is not working. please help
test class @istest public class testinsertaccount { testmethod static void mytest() { account acc=new account(name='jaddd'); insert acc; integer a=[select count() from account]; insertaccount i1=new insertaccount(); i1.insert1(); integer b=[select count() from account]; system.assertequals(a,b); } } apex class:- public class insertaccount { public account acc; public void insert1() { acc=new account(name='yugandhar',industry='banking'); insert acc; } }
If its helps, please mark as best answer so it will help to other who will serve same problem.
Thanks!
All Answers
If its helps, please mark as best answer so it will help to other who will serve same problem.
Thanks!
Please read more about for test classes in below blog.
http://amitsalesforce.blogspot.in/2015/06/best-practice-for-test-classes-sample.html
Please mark this as solution if this will help you
try this test class
Thanks!