During plugin simulation, the private properties are getting reset to default(instead of mocked values) #67
Replies: 3 comments 2 replies
-
@AnoopRawat I believe what's happening there is that you're trying to mock a property on the entity record Plugin simulation takes a snapshot of the entity record before running it through the pipeline, therefore, if you tried to set any other property other than entity field names / values, they'll be probably ignored. If the propery had a setter that would map the value to an actual field in the entity, then it probably should retain the value. Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
@jordimontana82 : Thanks for your reply, and yes this property (out of many other) is private and doesn't has any public setter (by design there is public method in Entity which set this private prop.), but we still need to have the mocked value for this private property (set by public method before plugin simulation). |
Beta Was this translation helpful? Give feedback.
-
@AnoopRawat Did you have a chance to try this again? |
Beta Was this translation helpful? Give feedback.
-
Continuing discussion that was raised here: jordimontana82/fake-xrm-easy#599 as it belongs to this repo.
Beta Was this translation helpful? Give feedback.
All reactions