You need to sign in to do that
Don't have an account?
sridhar sridhar
code coverage for Auto Populate one object field values into another object
Hi,
Can anybody help me on this please.
I have two custom objects.1) Fund 2) Refund
have 15 custom fields on both objects like i) Primary_value__C ii) Primary_1_value__C
we have writtern a chandler class which is calling on before update trigger.
class is working ,Handler class code snippet:
a.Primary_value__C = b.Primary_1_value__C ;
a.Inventory_price__C = b.Inventory_1_value__C;
a.Monthly_val_c = b.Monthly_1_val__c;
.
.
.
.
.
But,
i am facing code coverge issue for all mapped fields, remaining whole class getting code coverage.
In test class i initiated two objects and passed values for all the fields and inserted, still unable to code coverage for those 15 mapped fields. so i am getting only 54% code coverage which is creatig deploymet problem.
How can i come out of this problem??
Can anybody help me on this please.
I have two custom objects.1) Fund 2) Refund
have 15 custom fields on both objects like i) Primary_value__C ii) Primary_1_value__C
we have writtern a chandler class which is calling on before update trigger.
class is working ,Handler class code snippet:
a.Primary_value__C = b.Primary_1_value__C ;
a.Inventory_price__C = b.Inventory_1_value__C;
a.Monthly_val_c = b.Monthly_1_val__c;
.
.
.
.
.
But,
i am facing code coverge issue for all mapped fields, remaining whole class getting code coverage.
In test class i initiated two objects and passed values for all the fields and inserted, still unable to code coverage for those 15 mapped fields. so i am getting only 54% code coverage which is creatig deploymet problem.
How can i come out of this problem??
From your words, i could assume that you need to update the records to cover the class because the handler is on before update trigger.
For detailed help, Could you please paste code of the handler class.
Regards,
Ashish Kr.