示例#1
0
        public void TestGenericMessageRemoval()
        {
            XrmFakedContext context = new XrmFakedContext();

            context.AddGenericFakeMessageExecutor("new_TestAction", new FakeMessageExecutor());
            IOrganizationService service = context.GetOrganizationService();
            OrganizationRequest  request = new OrganizationRequest("new_TestAction");

            request["input"] = "testinput";
            OrganizationResponse response = service.Execute(request);

            Assert.Equal("testinput", response["output"]);
            context.RemoveGenericFakeMessageExecutor("new_TestAction");
            Assert.Throws(typeof(FakeXrmEasy.PullRequestException), () => service.Execute(request));
        }