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

Unit Tests - Dotnet #743

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

Conversation

geisterfurz007
Copy link
Contributor

What does this PR do?

This PR adds generated unit tests to the Dotnet SDK.

It also contains a deserialization fix that caused a KeyNotFoundException when a key was missing from the response map (I am not sure what the behaviour from the server is, whether the value is returned as null or doesn't exist in the map). The error came up when testing the User-related services that failed deserialization because the password field (amongst others) was not present in the mocked response.

Test Plan

Generate the SDK, then run dotnet test in the generated SDK's src directory.

Related PRs and Issues

#680

Have you read the Contributing Guidelines on issues?

Yup

@geisterfurz007
Copy link
Contributor Author

I have a question on this particular one. Some SDKs contain tests for serializing using the respective Model classes. I did work on those in here as well but faced a fairly annoying problem: The output of ToMap fails when fed into From due to the casting to JObject / JArray. Thus the question: How should I address that? I'd rather not meddle with the (de-)serialization too much if possible but I am not sure if leaving the tests out is a good idea either.

@abnegate
Copy link
Contributor

Are you make these test run automatically with the existing tests?

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.

None yet

2 participants