1 answer
try this : @isTest
private class testClass{
static testMethod void TestCls(){
account acc = new account();
acc.Name = 'test';
// add all required fields here
insert acc;
opportunity op = new Opportunity();
op.Name = 'Xyz';
op.AccountId = acc.id;
op.CloseDate = system.today();
op.StageName ='Closed Won';
insert op;
Map_Opportunities mapOpp = new Map_Opportunities();
}
}
Thanks, let us know if it helps you