コード例 #1
0
        public void JiraVersionMovePositioner_GetVersionBeforeCreatedVersion_WithOnlyMinorDifference_ReturnsCorrectVersion()
        {
            var jiraProjectVersions = CreateSemanticJiraProjectVersions("1.8.1", "1.8.3");
            var createdVersion      = CreateSemanticVersion("1.8.2");

            var jiraVersionMovePositioner = new JiraVersionPositionFinder <SemanticVersion> (jiraProjectVersions, createdVersion);
            var versionCreatedBefore      = jiraVersionMovePositioner.GetVersionBeforeCreatedVersionOrderedList();

            Assert.That(versionCreatedBefore.ComparableVersion.ToString(), Is.EqualTo("1.8.1"));
        }
コード例 #2
0
        public void JiraVersionMovePositioner_GetVersionBeforeCreatedVersion_WithPrereleaseVersion_ReturnsCorrectVersion()
        {
            var jiraProjectVersions = CreateSemanticJiraProjectVersions("2.1.3", "2.2.0");

            var createdVersion = CreateSemanticVersion("2.2.0-alpha.5");

            var jiraVersionMovePositioner = new JiraVersionPositionFinder <SemanticVersion> (jiraProjectVersions, createdVersion);
            var versionBeforeCreated      = jiraVersionMovePositioner.GetVersionBeforeCreatedVersionOrderedList();

            Assert.That(versionBeforeCreated.ComparableVersion.ToString(), Is.EqualTo("2.1.3"));
        }
コード例 #3
0
        public void JiraVersionMovePositioner_GetVersionBeforeCreatedVersion_WouldBeMovedToFirstPosition_ReturnsNull()
        {
            var jiraProjectVersions = CreateSemanticJiraProjectVersions("1.0.1");

            var createdVersion = CreateSemanticVersion("1.0.0");

            var jiraVersionMovePositioner = new JiraVersionPositionFinder <SemanticVersion> (jiraProjectVersions, createdVersion);
            var versionCreatedBefore      = jiraVersionMovePositioner.GetVersionBeforeCreatedVersionOrderedList();

            Assert.That(versionCreatedBefore, Is.Null);
        }