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

ucm: Unit tests #12

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

crojewsk
Copy link
Member

@crojewsk crojewsk commented May 8, 2023

Add a new project to host unit tests for the UCM serializer library. Framework of choice: xUnit - a successor to NUnit, widely adopted in .NET community. As there is no results visualizer available by default, freely available Coverlet is selected. The runsettings file and projects dependencies reflect this selection.

With project added, several test group are implemented, one per source file found in NUcmSerializer project. Current code coverage: 84% lines, 74% branches. In time, more will be added to fill the gaps.

While one can launch these directly from VisualStudio, run_tests.sh introduced by the last change ensures CLI friendliness. With it, tests can be triggered and results visualized from the command line.

Add a new project to host unit tests for the UCM serializer library.
Framework of choice: xUnit - a successor to NUnit, widely adopted in
.NET community.

As there is no results visualizer available by default, freely available
Coverlet is selected. The runsettings file and projects dependencies
reflect this selection.

Along come few tests for the UcmSerializer class so that the initial
commit of the project is not left empty handed.

Signed-off-by: Cezary Rojewski <[email protected]>
Have code lines and branches coveraged to improve maintainability
of the UCM serializer.

Signed-off-by: Cezary Rojewski <[email protected]>
Have code lines and branches coveraged to improve maintainability
of the UCM serializer.

Signed-off-by: Cezary Rojewski <[email protected]>
Have code lines and branches coveraged to improve maintainability
of the UCM serializer.

Signed-off-by: Cezary Rojewski <[email protected]>
Have code lines and branches coveraged to improve maintainability
of the UCM serializer.

Signed-off-by: Cezary Rojewski <[email protected]>
Have code lines and branches coveraged to improve maintainability
of the UCM serializer.

Signed-off-by: Cezary Rojewski <[email protected]>
Have code lines and branches coveraged to improve maintainability
of the UCM serializer.

Signed-off-by: Cezary Rojewski <[email protected]>
Be CLI friendly by adding shell script that triggers the execution and
visualization of unit tests. Settings found in .runsettings.xml file are
taken into account so regardless of execution method, those are still in
effect.

Signed-off-by: Cezary Rojewski <[email protected]>
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.

1 participant