Interpreter–part 3 of n -Testing

Series:

  1. http://msprogrammer.serviciipeweb.ro/2018/07/16/interpreterpart-1-of-n/ – Idea
  2. http://msprogrammer.serviciipeweb.ro/2018/07/23/interpreterpart-2-of-n/ – Coding
  3. http://msprogrammer.serviciipeweb.ro/2018/07/30/interpreterpart-3-of-n/ – Testing
  4. http://msprogrammer.serviciipeweb.ro/2018/08/06/interpreterpart-4-of-n/  – Deploy
  5. http://msprogrammer.serviciipeweb.ro/2018/08/13/interpreterpart-5-of-n/ – Documentation
  6. http://msprogrammer.serviciipeweb.ro/2018/08/20/interpreterpart-6-of-n/ – Ecosystem / usage

 

 

Now that we do not have just the interpreter part 1 idea, but also interpreter part 2 coding , we can test the application.

For this we should write test for everything that we wrote in the interpreter part 1  idea  .

That gives us a bunch of tests functions:

void InterpretDateTime();
void InterpretDateTimeUtcNow();
void InterpretEnv();
void InterpretGuid();
void InterpretSettingsFile();
void InterpretStaticOneParameter();
void InterpretStaticParameterString();
void InterpretStaticTwoParameterString();

 

We run those test with VS or

dotnet test

and we think that is ok.

Nope. We should , to be sure,to have the code coverage – means that we verify what we have tested . You can start from here : https://dotnetthoughts.net/code-coverage-in-netcore-with-coverlet/

The first iteration for my project gives to me

Assemblies: 1
Classes: 2
Files: 2
Covered lines: 196
Uncovered lines: 17
Coverable lines: 213
Total lines: 313
Line coverage: 92%
Branch coverage: 84.60%

That it is pretty solid.