Ejemplo n.º 1
0
        public void GetVersionAssemblyInfoVersion()
        {
            Version version = Assembly.GetAssembly(typeof(GetVersion)).GetName().Version;

            GetVersion task = new GetVersion()
            {
                AssemblyInfoFile = Path.GetFullPath("SolutionInfo.cs")
            };

            Assert.IsTrue(task.Execute());
            Assert.AreEqual(version.Major, task.Major);
            Assert.AreEqual(version.Minor, task.Minor);
            Assert.AreEqual(version.Build, task.Build);
            Assert.AreEqual(version.Revision, task.Revision);
        }
Ejemplo n.º 2
0
        public void GetVersionAssemblyVersion()
        {
            Assembly assembly = Assembly.GetAssembly(typeof(GetVersion));
            Version version = assembly.GetName().Version;

            GetVersion task = new GetVersion()
            {
                AssemblyFile = Regex.Replace(assembly.CodeBase, @"^file:///", String.Empty)
            };

            Assert.IsTrue(task.Execute());
            Assert.AreEqual(version.Major, task.Major);
            Assert.AreEqual(version.Minor, task.Minor);
            Assert.AreEqual(version.Build, task.Build);
            Assert.AreEqual(version.Revision, task.Revision);
        }