During plugin simulation, the private properties are getting reset to default(instead of mocked values) #599
Replies: 3 comments
-
@AnoopRawat Thank you for raising this. I'll move this discussion into the DynamicsValue/fake-xrm-easy repo. This discussion belongs to the deprecated version v1 repo which doesn't have this functionality. |
Beta Was this translation helpful? Give feedback.
-
@AnoopRawat I can't actually transfer the discussion because it belongs to a different org, could we please continue the discussion here? DynamicsValue/fake-xrm-easy#67 |
Beta Was this translation helpful? Give feedback.
-
I'm closing this discussion now, feel free to raise any questions ion the other discussion link. |
Beta Was this translation helpful? Give feedback.
-
I've private property
'_seriesNumber'
in my plugin'SeriesSaveAction'
, I mock this property before PluginSimulation but it always reset to null during simulation pipeline, while during call to other method of entity, this property shows correct mocked value.Below is sample code
Entity code :
Unit test method is like :
In plugin simulation, at some point plugin calls
ValidSeriesNumber(),
but the private property is always Null inside this method, however it should be showing-up mocked value.Question:
why the private property is null during plugin simulation, but has mocked value during normal method call ?
how to correctly mock during plugin simulation pipeline ? am I missing something ?
Beta Was this translation helpful? Give feedback.
All reactions