Skip to content

Create test project and some basic tests #27

Description

@Issung

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".

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions