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

Create test project and some basic tests #27

Open
Issung opened this issue Mar 16, 2023 · 0 comments
Open

Create test project and some basic tests #27

Issung opened this issue Mar 16, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Issung
Copy link
Owner

Issung commented Mar 16, 2023

Nowadays writing code without tests makes me nervous.
Tests are a great way to:

  • Define the contract of what your code should do.
  • Ensure you don't break anything.
  • Drive your development (in certain cases).
  • Make intended behaviour clearer to peers.

My preferred testing framework is xunit.

  • You will need to make a new project using this short guide: https://xunit.net/docs/getting-started/netfx/visual-studio.
  • Call the project GChan.Test.
  • Add the original GChan project as a dependency.
  • Add some basic tests for the ImageLink class, test that generating with each different format (and an unexpected format) gives the expected output.
  • Look for other classes than can be easily tested.

CICD:

  • If doing this after making the GitHub Actions pipeline, add testing of this project to the pipeline.
  • If doing this before that issue, update the other issue to say "add unit testing to pipeline".
@Issung Issung added enhancement New feature or request good first issue Good for newcomers labels Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant