HCV- adding tests–part 3

Now it is time to add tests . Even if will not compile, the tests should show how the application behaves. Here are the tests:

 

using System;
using Xunit;

namespace TestHealthCheckVersion
{
    public class TestHCV
    {
        [Fact]
        public void TestStartAssemblyVersion()
        {
            #region Arrange
            var hcv = new HCV();
            #endregion
            #region Act
            string v = hcv.GetStartingAssemblyInformation();
            #endregion
            #region Assert
            Assert.Equal("1.0.0.0", v);
            #endregion
        }
        [Fact]
        public void TestHCVAssemblyVersion()
        {
            #region Arrange
            var hcv = new HCV();
            #endregion
            #region Act
            string v = hcv.GetHCVAssemblyInformation();
            #endregion
            #region Assert
            Assert.Equal("1.0.0.0", v);
            #endregion
        }
    }
}

The code ( again, even if not compile ) it is at https://github.com/ignatandrei/HealthCheckVersion/releases/tag/addingTests

 

HealthCheckVersion

Health Check for Version
 NameLink
1Idea and Githubhttp://msprogrammer.serviciipeweb.ro/2020/07/20/healthcheckversion-idea-part-1/
2Documentationhttp://msprogrammer.serviciipeweb.ro/2020/07/21/healthcheckversiondocumentation-part-2/
3Testshttp://msprogrammer.serviciipeweb.ro/2020/07/22/hcv-adding-testspart-3/
4Codehttp://msprogrammer.serviciipeweb.ro/2020/07/23/hcv-adding-codepart-4/
5Test Applicationhttp://msprogrammer.serviciipeweb.ro/2020/07/27/hcvadding-test-applicationpart-5/
6CIhttp://msprogrammer.serviciipeweb.ro/2020/07/28/hcvautomatic-cipart-6/
7NuGethttp://msprogrammer.serviciipeweb.ro/2020/07/29/hcvpreparing-for-nugetpart-7/
8PostMortemhttp://msprogrammer.serviciipeweb.ro/2020/07/30/hcv-postmortempart-8/