You need to sign in to do that
Don't have an account?
Kasia Wojewodzka 7
Test Class for Process Builder: Error MessageSystem.AssertException: Assertion Failed
Dear Community
Hope you can assit me with resoloving the error messge for the test class
I want to confim that inserted custom Object for test account (where Account Shipping Code is GB) has a correct Email Address updated under custom field: ISAM team to be notified . I am getting error
Error MessageSystem.AssertException: Assertion Failed: Expected: ISAMS-UK@idexx.com, Actual: isams-uk@idexx.com
Stack TraceClass.Test_PB_CMFUPdateISAMEmail.testCountryGB: line 35, column 1
Would you know how this should fixed?
Hope you can assit me with resoloving the error messge for the test class
I want to confim that inserted custom Object for test account (where Account Shipping Code is GB) has a correct Email Address updated under custom field: ISAM team to be notified . I am getting error
Error MessageSystem.AssertException: Assertion Failed: Expected: ISAMS-UK@idexx.com, Actual: isams-uk@idexx.com
Stack TraceClass.Test_PB_CMFUPdateISAMEmail.testCountryGB: line 35, column 1
Would you know how this should fixed?
@isTest public class Test_PB_CMFUPdateISAMEmail { //tests the following: //Process Builder : "EU - EMEA CMF Updates" //test is only for 1 Action update field on CMF Form ISAM team to be notified based on account country @TestSetup static void setup() { //Create an Account Account testAccount = new Account( RecordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByName().get('Customer').getRecordTypeId(), Name = 'Test Account', SAP_Customer_Number__c ='0012345678', ShippingCountryCode = 'GB' ); insert testAccount; //Create Cusotmer Master fiele Update record with 1 of the countires GB Customer_Master_File_Update__c testCMF = new Customer_Master_File_Update__c( Name = 'test', RecordTypeId = Schema.SObjectType.Customer_Master_File_Update__c.getRecordTypeInfosByName().get('Change of Fiscal Data').getRecordTypeId(), Account_To_Update__c = testAccount.Id ); insert testCMF; } //Tests condition Customer Master file Account Shipping Country = 'GB' @isTest static void testCountryGB(){ Test.startTest(); Customer_Master_File_Update__c testCMF = [SELECT Id, ISAM_team_to_be_notified__c FROM Customer_Master_File_Update__c]; system.assertEquals('ISAMS-UK@idexx.com', testCMF.ISAM_team_to_be_notified__c ); Test.stopTest(); } }
This appears to be an issue with case sensitivity failing at system.assertequals method.
Can you try the approach mentioned in https://salesforce.stackexchange.com/questions/58683/apex-assert-vs-assertequals/58685 to see if it fixes the issue.
Thank you
All Answers
This appears to be an issue with case sensitivity failing at system.assertequals method.
Can you try the approach mentioned in https://salesforce.stackexchange.com/questions/58683/apex-assert-vs-assertequals/58685 to see if it fixes the issue.
Thank you