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); }
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); }
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); }