Skip to main content
Robert Cruz ha fatto una domanda in #Apex
I used the sample posted here in the help docs https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_class_Auth_ConnectedAppPlugin.htm

I was able to update the customAttributes method to update the SAML response with additional attributes and this works well.  However I have been searching everywhere to find the sample test class to go with the extension sample.  Has anyone done this that can provide a basic sample?
8 risposte
  1. 4 gen 2019, 16:37
    Try like this

     

    @IsTest

    public class ConnectedAppPluginExampleTest {

    @isTest

    public static void customAttributesTest(){

    Map<String,String> mapstr = new Map<String,String>();

    Test.startTest();

    ConnectedAppPluginExample cap = new ConnectedAppPluginExample ();

    Map<String,String> respMapStr = cap.customAttributes(UserInfo.getUserId(),mapstr);

    Test.stopTest();

    Map<String,String> mapstrempty = new Map<String,String>();

    System.assertNotEquals(respMapStr,mapstrempty);

    }

    }

     
0/9000