Example #1
0
        public void TestMethod1()
        {
            var entidade = new Entity();

            entidade.LogicalName = "account";
            entidade["name"]     = "Conta teste";

            var pluginContext = new TestPluginContext();
            var provider      = new TesteServiceProvider(pluginContext);

            pluginContext.InputParameters["Target"] = entidade;
            pluginContext.PrimaryEntityName         = "account";
            pluginContext.MessageName = "SetState";
            pluginContext.Stage       = (int)TesteServiceProvider.Stagio.PreEvento;


            var plugin = new Crm.Plugins.Account.TesteSetState();

            plugin.Execute(provider);
        }
Example #2
0
 public TesteServiceProvider(TestPluginContext pluginContext)
 {
     _pluginContext = pluginContext;
 }