jordimontana82 / fake-xrm-easy

The testing framework for Dynamics CRM and Dynamics 365 which runs on an In-Memory context and deals with mocks or fakes for you
https://dynamicsvalue.com/get-started/overview?source=git
Other
263 stars 182 forks source link

`PipelineSimulation` does not support plugin with `unsecureSettings, secureSettings` arguments #546

Closed skfd closed 1 year ago

skfd commented 3 years ago

Is this a bug really? I'd say it's a bug because I use PipelineSimulation as expected, registering my plugin (that only has full constructur with arguments). The registration succeeds, but execution crashes nastily because plugin does not satisfy new() constraint.

Describe the bug Code with PipelineSimulation crashes with obscure error instead of explicitly throwing "we have no support for Plugins that depend on SecureConfiguration/UnsecureConfiguration configuration yet"

To Reproduce Here is a minimal plugin. I'm sure lots of people use UnsecureSettings feature.

public abstract class PluginBase : IPlugin
{
    protected readonly string UnsecureSettings;
    protected readonly string SecureSettings;

    protected PluginBase(string unsecureSettings, string secureSettings)
    {
        UnsecureSettings = unsecureSettings;
        SecureSettings = secureSettings;
    }
}

Expected behavior

FakeXrmEasy and Dynamics 365 / CRM version FakeXrmEasy 1.57.1

jordimontana82 commented 3 years ago

Thanks for raising this. Pipeline is being redeveloped in v2 so I'll take this into account.

jordimontana82 commented 1 year ago

@skfd also closing as per https://github.com/jordimontana82/fake-xrm-easy/issues/480#issuecomment-1507609668