Exemplo n.º 1
0
        public void CloneTest()
        {
            var version1 = new ProjectVersion(1, 1, 1, 1);
            var version2 = version1.Clone() as ProjectVersion;

            Assert.IsTrue(version1 == version2);
        }
Exemplo n.º 2
0
        /// <summary>
        ///   Evaluates "to be" <c>ProjectVersion</c> according to numbering
        ///   scheme configured.
        /// </summary>
        /// <param name="currentProjectVersion">
        ///   Current <c>ProjectVersion</c>.
        /// </param>
        /// <returns>
        ///   Next version.
        /// </returns>
        private ProjectVersion GetToBecomeProjectVersion(ProjectVersion currentProjectVersion)
        {
            ProjectVersion toBecomeProjectVersion = ProjectVersion.Empty;

            if (currentProjectVersion != ProjectVersion.Empty)
            {
                if (m_numberingOptions.UseDateTimeBasedBuildAndRevisionNumbering)
                {
                    toBecomeProjectVersion = currentProjectVersion.Clone(m_autoBuildVersion, m_autoRevisionVersion, m_numberingOptions.ReplaceAsteriskWithVersionComponents);
                }
                else
                {
                    toBecomeProjectVersion = currentProjectVersion.Clone();
                    toBecomeProjectVersion.Increment(m_numberingOptions);
                }
            }
            return(toBecomeProjectVersion);
        }