You need to sign in to do that
Don't have an account?

trigger test class help
trigger abcAccount on Opportunity (before update) { list<id> oppIds = new list<id>(); Set<Id> AccountIds = new Set<Id>(); //if(trigger.isInsert || trigger.isUpdate){ for(opportunity opp : trigger.new){ accountIds.add(opp.AccountId); } Map<Id, Account> accountMap = new Map<Id, Account>([SELECT Name FROM Account WHERE Id IN :accountIds]); String sName; for (Opportunity op : Trigger.new) { // add the account name sName = accountMap.get(op.AccountId).Name; System.debug('Account name'+sName); if(sName=='Axis'){ // system.debug('opp'+opp); op.amount = op.amount*10/100; //oppIds.add(op.id); } } }
100 % code coverage