Exemple #1
0
        public void AutoGenerateAssemblyVersion_False(string prefix, string buildNumber, string expectedAssemblyVersion, string expectedFileVersion)
        {
            var task = new CalculateAssemblyAndFileVersions()
            {
                VersionPrefix = prefix,
                BuildNumber   = buildNumber,
            };

            bool result = task.Execute();

            Assert.Equal(expectedAssemblyVersion, task.AssemblyVersion);
            Assert.Equal(expectedFileVersion, task.FileVersion);
            Assert.True(result);
        }
Exemple #2
0
        public void AutoGenerateAssemblyVersion_True(string prefix, int patchNumber, string expectedVersion)
        {
            var task = new CalculateAssemblyAndFileVersions()
            {
                VersionPrefix = prefix,
                PatchNumber   = patchNumber,
                AutoGenerateAssemblyVersion = true
            };

            bool result = task.Execute();

            Assert.Equal(expectedVersion, task.AssemblyVersion);
            Assert.Equal(expectedVersion, task.FileVersion);
            Assert.True(result);
        }