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

Implemented InstantiateTemplateRequest #243

Merged
merged 2 commits into from
Oct 25, 2024
Merged

Conversation

nedergaardcloud
Copy link

Reorganized and updated using directives in Core.cs for better code organization. Added InstantiateTemplateRequestHandler to InitializeDB method in Core.cs to handle InstantiateTemplate requests.

Updated XrmMockupShared.projitems to include InstantiateTemplateRequestHandler.cs.

Added new file InstantiateTemplateRequestHandler.cs defining the InstantiateTemplateRequestHandler class, which handles InstantiateTemplate requests by creating an email entity and returning it in an EntityCollection within the InstantiateTemplateResponse. Added validation checks in Execute method for TemplateId, ObjectId, and ObjectType. Throws FaultException if any validation fails.

Added tests for InstantiateTemplateRequest validation and response.

Rasmus Nedergaard added 2 commits October 22, 2024 12:22
Reorganized and updated `using` directives in `Core.cs` for better code organization. Added `InstantiateTemplateRequestHandler` to `InitializeDB` method in `Core.cs` to handle `InstantiateTemplate` requests. Made minor formatting changes in `Execute` method in `Core.cs`.

Updated `XrmMockupShared.projitems` to include `InstantiateTemplateRequestHandler.cs`. Reformatted `TestSendEmailRequestSuccessWhenIssueSendTrue` method in `TestSendEmail.cs` for readability. Added `TestInstantiateTemplateRequestReturnsInstantiateTemplateResponseWithEmail` test method to `TestSendEmail.cs`.

Added new file `InstantiateTemplateRequestHandler.cs` defining the `InstantiateTemplateRequestHandler` class, which handles `InstantiateTemplate` requests by creating an `email` entity and returning it in an `EntityCollection` within the `InstantiateTemplateResponse`.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Updated InstantiateTemplateRequestHandler.cs:
- Added `using` directives for `System` and `System.ServiceModel`.
- Added validation checks in `Execute` method for `TemplateId`, `ObjectId`, and `ObjectType`.
- Throws `FaultException` if any validation fails.

Modified SharedTests.projitems:
- Added new test file `TestInstantiateTemplate.cs`.

Updated TestSendEmail.cs:
- Removed `TestInstantiateTemplateRequestReturnsInstantiateTemplateResponseWithEmail` test method.

Created TestInstantiateTemplate.cs:
- Added tests for `InstantiateTemplateRequest` validation and response.
@mkholt mkholt merged commit ddafa2e into master Oct 25, 2024
3 checks passed
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