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

Use static classes where possible #207

Closed
ErikSchierboom opened this issue Feb 20, 2017 · 4 comments
Closed

Use static classes where possible #207

ErikSchierboom opened this issue Feb 20, 2017 · 4 comments
Assignees

Comments

@ErikSchierboom
Copy link
Member

ErikSchierboom commented Feb 20, 2017

Some tests only require a static method to be present. If this is so, and if the implementation also only has static methods, we should convert the implementation to a static class.

@tushartyagi
Copy link
Contributor

@ErikSchierboom I can start working on this one. But this will also require changing the test cases and you are working on moving tests to xunit in #193 so it might be dependent on that. :)

What are your thoughts?

@ErikSchierboom
Copy link
Member Author

@tushartyagi There is indeed that xUnit dependency. You can work on this feature though, only you have to base your PR on the dotnet-core branch (which has the same contents my PR which contains the xUnit changes). So you can definitely work on this, as long as you base it on the dotnet-core branch :)

By the way, if you will be working on this, there are some exercises that currently have a constructor with one parameter and one single method being tested. I think that in most cases, those classes can be replaced with static classes, where the method being tested just gets an extra parameter.

If you need any help, just contact me in the Gitter room. Thanks for the help! It is much appreciated.

@tushartyagi
Copy link
Contributor

tushartyagi commented Feb 28, 2017

I have completed going through the exercises for classes which had:

  1. only static methods but the classes were not static
  2. tests were using static methods

Following is the list of exercises:

  • atbash-cipher
  • grains
  • triangle
  • word-count
  • wordy

PR#215 submitted for this.

@ErikSchierboom
Copy link
Member Author

@tushartyagi Brilliant! I've requested on small change in the PR. Thanks for looking into this!

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

2 participants