@@ -48,36 +48,40 @@ protected PatchAssemblyTestsBase(string assemblyName)
4848 _patchedAssembly = Assembly . LoadFile ( _patchedAssemblyPath ) ;
4949 }
5050
51+ protected abstract void AssertProductionVersion ( string version ) ;
52+
53+ protected abstract void AssertFileVersion ( string version ) ;
54+
55+ protected abstract void AssertInformationalVersion ( string version ) ;
56+
5157 [ Test ]
5258 public void InformationalVersionSetCorrectly ( )
5359 {
5460 var customAttributes = GetAssemblyInformationalVersionAttribute ( _patchedAssembly ) ;
5561
5662 // Assert
57- AssertVersion ( customAttributes . InformationalVersion ) ;
63+ var version = customAttributes . InformationalVersion ;
64+ AssertInformationalVersion ( version ) ;
5865 }
59-
66+
6067 [ Test ]
6168 public void FileVersionSetCorrectly ( )
6269 {
6370 var versionInfo = FileVersionInfo . GetVersionInfo ( _patchedAssemblyPath ) ;
64-
65- Assert . IsNotNull ( versionInfo . FileVersion ) ;
66- Assert . IsNotEmpty ( versionInfo . FileVersion ) ;
67- Assert . AreEqual ( "1.0.0.0" , versionInfo . FileVersion ) ;
71+ var version = versionInfo . FileVersion ;
72+ AssertFileVersion ( version ) ;
6873 }
69-
74+
7075 [ Test ]
7176 public void ProductionVersionSetCorrectly ( )
7277 {
7378 var versionInfo = FileVersionInfo . GetVersionInfo ( _patchedAssemblyPath ) ;
7479
7580 // Assert
76- AssertVersion ( versionInfo . ProductVersion ) ;
81+ var version = versionInfo . ProductVersion ;
82+ AssertProductionVersion ( version ) ;
7783 }
78-
79-
80-
84+
8185#if( DEBUG )
8286 [ Test ]
8387 public void PeVerify ( )
@@ -86,10 +90,6 @@ public void PeVerify()
8690 }
8791#endif
8892
89-
90- protected abstract void AssertVersion ( string version ) ;
91-
92-
9393 private static string GetAssemblyToPatchPath ( string assemblyName )
9494 {
9595
0 commit comments