You need to sign in to do that
Don't have an account?
Sarisfdc
Test Class for the String and Boolean getter
I have a string boolean whose value I am using in Javascript on VF page, How do I get the code coverage of the same in test class
Please help me to write the test class for these.
Thanks!
Public id guestuserid=[select id from user where Name =: 'Guest User' limit 1].id; public string Usertype {get { if (UserInfo.getUserId() != guestuserid) return 'APP USER'; else return 'GUEST'; }}And for the boolean getter, in below code Offset is integer having value zero asssigned.
public Boolean PreviousNew { get { if (offset>0) return false; else return true; }}
Please help me to write the test class for these.
Thanks!
YourClass var = new YourClass();
var temp = var.PreviousNew; //just used for coverage (include this line in your page anywhere)
Thanks
All Answers
YourClass var = new YourClass();
var temp = var.PreviousNew; //just used for coverage (include this line in your page anywhere)
Thanks
It worked :)