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

Tests and refactoring #52

Open
gaensebluemchenritter opened this issue Dec 17, 2019 · 4 comments
Open

Tests and refactoring #52

gaensebluemchenritter opened this issue Dec 17, 2019 · 4 comments

Comments

@gaensebluemchenritter
Copy link
Contributor

Hi there,

looking into Camunda.Api.Client we see that there are only two tests - and they are failing right now (at least we cannot get them to work in the master branch). We also see, that many class definitions are within other classes files, sometimes even within other classes - not sure, if that was indeed done on purpose or just out of convenience, but it makes it very hard to actually find some of the classes ...

So we have thought about a refactoring of the project and redoing the tests - and adding tests whenever we have the time. Also we think about introducing just enough interface-definitions to be able to unit test user code rather easily instead of using wrapper interfaces and classes in order to do so.

A first starting point for a discussion can be found here:
https://github.com/gaensebluemchenritter/Camunda.Api.Client/tree/Refactoring

Both tests are working right now and restructuring as well as pulling out embedded classes is done. Additional interface-definitions are still missing, however ...

Disclaimer: this is not meant as criticism, but we strongly believe that restructuring and refactoring the code will help in the future, making it easier to actually apply changes, enhancements, bugfixes, ... this also is naught but a starting point for a discussion, if this would indeed be helpful and if the structure is valid and self-explanatory enough. If there is no intention of thinking about stuff like that, it is ok - I just thought it could be interesting enough to talk about it.

@gaensebluemchenritter
Copy link
Contributor Author

Additional remark:

Yes, these are breaking changes, so rather than not user code would have to be changed as well!

@gaensebluemchenritter
Copy link
Contributor Author

Did some further updates:

  • introduced interfaces for client and main services - user code can do unit tests without having to define wrapper classes and other workarounds
  • added 2 missing resources/methods for identity service: GetPasswordPolicy and ValidatePassword
  • introduced subdirectories for specific history services

I found that the authorization service is missing completely - if I find time I'll try to add that and start looking into the TODO comments ...

@gaensebluemchenritter
Copy link
Contributor Author

further updates:

@gaensebluemchenritter
Copy link
Contributor Author

further updates:

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

No branches or pull requests

1 participant