When i tried to change access specifier from global to private in a test class its is showing this error - Enclosing type for global methods in apex classes must be declared as global ?? Is anyone there help me to solve this out?
Hi, I guess you are trying to change the access specifier of a class which contains a method declared as global. In order to resolve that, you must first declare that method as private. Only then you can set the access specifier of your class to private.
Hi, I guess you are trying to change the access specifier of a class which contains a method declared as global. In order to resolve that, you must first declare that method as private. Only then you can set the access specifier of your class to private.
I guess you are trying to change the access specifier of a class which contains a method declared as global. In order to resolve that, you must first declare that method as private. Only then you can set the access specifier of your class to private.
Let me know if it helps.
Thanks
All Answers
NOTE:- You can not access the Private method in Test Class. You need to use @TestVisible .
I guess you are trying to change the access specifier of a class which contains a method declared as global. In order to resolve that, you must first declare that method as private. Only then you can set the access specifier of your class to private.
Let me know if it helps.
Thanks
thanks Amit
thanks nagendar