Ejemplo n.º 1
0
        public void BumpPatch_Success(string preRelease, IncrementTypeEnum incrementType, string expected)
        {
            SemVersionPreRelease start = new SemVersionPreRelease(preRelease);

            if (incrementType == IncrementTypeEnum.Patch)
            {
                start.BumpPatch();
            }
            else if (incrementType == IncrementTypeEnum.Minor)
            {
                start.BumpMinor();
            }
            else if (incrementType == IncrementTypeEnum.Major)
            {
                start.BumpMajor();
            }
            else
            {
                start.BumpVersion();
            }

            SemVersionPreRelease end = new SemVersionPreRelease(expected);

            Assert.AreEqual(expected, start.Tag(), "A10:");
            Assert.AreEqual(end.ReleaseNumber, start.ReleaseNumber, "A20:");
            Assert.AreEqual(start.ReleaseType, end.ReleaseType, "A30:");
            Assert.AreEqual(end.IncrementType, start.IncrementType, "A40:");
        }