コード例 #1
0
        public void ReturnsTrueForDevelopBranch()
        {
            var context = new Context
            {
                BranchName = "develop",
                Version = "1.0.0-unstable0001"
            };
            var rule = new DisplayVersionRule();

            Assert.AreEqual("1.0.0-unstable0001 nightly", rule.GetParameter(context).Value);
        }
コード例 #2
0
        public void ReturnsFalseForMasterBranch()
        {
            var context = new Context
            {
                BranchName = "master",
                Version = "1.0.0"
            };
            var rule = new DisplayVersionRule();

            Assert.AreEqual("1.0.0", rule.GetParameter(context).Value);
        }
コード例 #3
0
        public void ReturnsTrueForDevelopBranchWithCiBuild()
        {
            var context = new Context
            {
                BranchName = "develop",
                Version = "1.0.0-unstable0001",
                IsCi = true
            };
            var rule = new DisplayVersionRule();

            Assert.AreEqual("1.0.0-unstable0001 ci", rule.GetParameter(context).Value);
        }