Activity Forums Salesforce® Discussions How to use containsIgnoreCase in mock class in Salesforce?

  • How to use containsIgnoreCase in mock class in Salesforce?

    Posted by Deepak on September 15, 2020 at 4:38 pm

    How to use containsIgnoreCase in mock class in Salesforce?

    Anuj replied 2 years ago 2 Members · 1 Reply
  • 1 Reply
  • Anuj

    Member
    September 16, 2020 at 1:36 pm

    The containsIgnoreCase() function takes string or searchString as arguments. It returns True if the string contains the searchString. Otherwise, it returns False.
    For e.g
    String s = 'hello';
    Boolean b = s.containsIgnoreCase('HE');
    System.assertEquals(true,b);

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos