public void When_modifying_the_assembly_informational_version_it_should_modify_it_and_save_it()
        {
            // ----------------------------------------------------------------
            // ARRANGE
            //-----------------------------------------------------------------
            string assemblyInfoFile = AppDomain.CurrentDomain.BaseDirectory + "\\Resources\\AssemblyInfo_1.txt";
            var parser = new AssemblyInfoWriter(assemblyInfoFile);

            // ----------------------------------------------------------------
            // ACT
            //-----------------------------------------------------------------
            parser.ModifyAssemblyInformationalVersion("2.2.2.2");

            // ----------------------------------------------------------------
            // ASSERT
            //-----------------------------------------------------------------
            bool parserReplacedValue = FindInFile(AssemblyInfoContext.AssemblyInformationalVersionBeginText + "2.2.2.2" +
                AssemblyInfoContext.LastPartOfLine, assemblyInfoFile);

            Assert.IsTrue(parserReplacedValue);
        }
        private void ModifyAssemblyInformationalVersion(AssemblyInfoWriter writer, AssemblyInfoReader reader)
        {
            Log.LogMessage(MessageImportance.Normal,
                           string.Format("Modifying AssemblyInformationalVersion with pattern: {0}", AssemblyInformationalVersion));

            try
            {
                string newValue = new PatternBasedParser().Replace(reader.GetAssemblyFileVersion(), AssemblyInformationalVersion);

                writer.ModifyAssemblyInformationalVersion(newValue);
            }
            catch (ApplicationException exception)
            {
                Log.LogErrorFromException(exception);
            }
        }