Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CreateMultipleRequestHandler and related plugins and tests #247

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

magesoe
Copy link
Collaborator

@magesoe magesoe commented Jan 13, 2025

Add CreateMultipleRequestHandler and related plugins and tests.

  • CreateMultipleRequestHandler: Add CreateMultipleRequestHandler class to handle CreateMultipleRequest in src/XrmMockupShared/Requests/CreateMultipleRequestHandler.cs.
  • Project File: Update src/XrmMockup365/XrmMockup365.csproj to include the new handler.
  • Test for CreateMultipleRequestHandler: Add TestCreateMultipleRequestHandler class in tests/XrmMockup365Test/TestCreateMultipleRequestHandler.cs to test the creation of multiple entities.
  • CreateMultipleRequestPlugin: Add CreateMultipleRequestPlugin class in tests/SharedPluginsAndCodeactivities/CreateMultipleRequestPlugin.cs to set the name attribute to "Bob".
  • UpdateLastNamePlugin: Add UpdateLastNamePlugin class in tests/SharedPluginsAndCodeactivities/UpdateLastNamePlugin.cs to set the lastname attribute to "Saget".
  • Test for CreateMultipleRequestPlugin: Add TestCreateMultipleRequestPlugin class in tests/SharedTests/TestCreateMultipleRequestPlugin.cs to test the execution of CreateMultipleRequestPlugin and UpdateLastNamePlugin.
  • Test for CreateRequestPlugin: Add TestCreateRequestPlugin class in tests/SharedTests/TestCreateRequestPlugin.cs to test the execution of CreateRequest and ensure both firstname and lastname are set correctly.
  • PluginManager: Update src/XrmMockupShared/Plugin/PluginManager.cs to trigger CreateMultipleRequest plugins when a CreateRequest is executed and vice versa.

For more details, open the Copilot Workspace session.

Add CreateMultipleRequestHandler and related plugins and tests.

* **CreateMultipleRequestHandler**: Add `CreateMultipleRequestHandler` class to handle `CreateMultipleRequest` in `src/XrmMockupShared/Requests/CreateMultipleRequestHandler.cs`.
* **Project File**: Update `src/XrmMockup365/XrmMockup365.csproj` to include the new handler.
* **Test for CreateMultipleRequestHandler**: Add `TestCreateMultipleRequestHandler` class in `tests/XrmMockup365Test/TestCreateMultipleRequestHandler.cs` to test the creation of multiple entities.
* **CreateMultipleRequestPlugin**: Add `CreateMultipleRequestPlugin` class in `tests/SharedPluginsAndCodeactivities/CreateMultipleRequestPlugin.cs` to set the `name` attribute to "Bob".
* **UpdateLastNamePlugin**: Add `UpdateLastNamePlugin` class in `tests/SharedPluginsAndCodeactivities/UpdateLastNamePlugin.cs` to set the `lastname` attribute to "Saget".
* **Test for CreateMultipleRequestPlugin**: Add `TestCreateMultipleRequestPlugin` class in `tests/SharedTests/TestCreateMultipleRequestPlugin.cs` to test the execution of `CreateMultipleRequestPlugin` and `UpdateLastNamePlugin`.
* **Test for CreateRequestPlugin**: Add `TestCreateRequestPlugin` class in `tests/SharedTests/TestCreateRequestPlugin.cs` to test the execution of `CreateRequest` and ensure both `firstname` and `lastname` are set correctly.
* **PluginManager**: Update `src/XrmMockupShared/Plugin/PluginManager.cs` to trigger `CreateMultipleRequest` plugins when a `CreateRequest` is executed and vice versa.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/delegateas/XrmMockup?shareId=XXXX-XXXX-XXXX-XXXX).
Requests = new OrganizationRequestCollection { new CreateRequest { Target = (Entity)entity } }
};

TriggerSync("createmultiple", stage, entity, preImage, postImage, createMultiplePluginContext, core, executionOrderFilter);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does dataverse actually do this? I am surprised

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants