4

Guys need some help in figuring out where I am going wrong. I am getting the above error at line 3. Any help is appreciated.

@isTest
private class LabsContactLookupPopupController_Test {
    public static testMethod void testSearch() {
        System.runAs( System.runAs(TestDataUtil.createUser('TestUser'))){
            Id appOwnerId = TestDataUtil.appOwner_Creation(testContactLookup);
            String appOwnerId_String = String.valueOf(appOwnerId);
            LabsContactLookupPopupController controller = new LabsContactLookupPopupController();
            controller.setQuery(appOwnerId_String);
            controller.runQuery();
            List<Contact> resultContact = controller.getContacts();
            controller.setContactIdval(appOwnerId_String);
            system.assertequals(appOwnerId_String,controller.getContactIdval());
        }
    }
}

Thanks, Dinesh

2

Edit: removing my snippy comments because you formatted it properly right after.

You have System.runAs( System.runAs(. Remove one of them and it will compile, assuming your utility method is sound.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.