You need to sign in to do that
Don't have an account?
Sam Swann
Can someone please help me out writing a test class and methods that call the above methods?
Thanks
Test class for Single-Sign-On Auto generated JIT handler.
Hi
I am new to this Single-Sign-on configuration.
I have customized the autogenerated Jit handler Apex class to insert/update the user record as per my requirement.
While writing a test class for this auto-generated Jit handler class, I am running into some errors.
Here are the methods I am trying to refer from Jit handler:
/*Create User */ global User createUser(Id samlSsoProviderId, Id communityId, Id portalId, String federationIdentifier, Map<String, String> attributes, String assertion) { User u = new User(); handleJit(true, u, samlSsoProviderId, communityId, portalId, federationIdentifier, attributes, assertion); return u; } /*Update User */ global void updateUser(Id userId, Id samlSsoProviderId, Id communityId, Id portalId, String federationIdentifier, Map<String, String> attributes, String assertion) { User u = [SELECT FirstName, LastName, Phone, Email FROM User WHERE Id=:userId]; handleJit(false, u, samlSsoProviderId, communityId, portalId, federationIdentifier, attributes, assertion); } /*Jit Handler method */ private void handleJit(boolean create, User u, Id samlSsoProviderId, Id communityId, Id portalId, String federationIdentifier, Map<String, String> attributes, String assertion) { if(communityId != null) { handleUser(create, u, attributes, federationIdentifier, false); } else { handleUser(create, u, attributes, federationIdentifier, true); } } /*HandleUser method*/ // This method has some basic insert and update User fields based on my requirement.
Can someone please help me out writing a test class and methods that call the above methods?
Thanks
Update: To just to have a good visualization.
If someone responds before EOD today, that would be great.
Thanks.