public void TestIncrementVersion_IncrementsTrailingIntegerVersion() { const string initalVersion = "My1Version3"; string result = GcpPublishStepsUtils.IncrementVersion(initalVersion); Assert.AreEqual("My1Version4", result); }
public void TestIncrementVersion_HandlesNull() { GcpPublishStepsUtils.NowOverride = DateTime.Parse("2023-10-10 10:10:10"); string result = GcpPublishStepsUtils.IncrementVersion(null); Assert.AreEqual(GcpPublishStepsUtils.GetDefaultVersion(), result); }
public void TestIncrementVersion_AppendsTrailingInteger() { const string initalVersion = "My1Version2BeUpdated"; string result = GcpPublishStepsUtils.IncrementVersion(initalVersion); Assert.AreEqual("My1Version2BeUpdated2", result); }
public void TestIncrementVersion_ReplacesDefaultVersion() { GcpPublishStepsUtils.NowOverride = DateTime.Parse("2011-11-11 01:01:01"); string initalVersion = GcpPublishStepsUtils.GetDefaultVersion(); GcpPublishStepsUtils.NowOverride = DateTime.Parse("2012-12-12 02:02:02"); string result = GcpPublishStepsUtils.IncrementVersion(initalVersion); Assert.AreEqual(GcpPublishStepsUtils.GetDefaultVersion(), result); }