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:
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | 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
Leave a Reply