Exemplo n.º 1
0
        public void ShouldGetTheCorrectLatestVersion(string mask, string[] versionList, string expected)
        {
            var versions       = versionList.Select(version => SemanticVersion.Parse(version)).ToList();
            var currentVersion = SemanticVersionMask.GetLatestMaskedVersion(mask, versions);

            Assert.AreEqual(currentVersion.ToString(), expected);
        }
Exemplo n.º 2
0
        public void ShouldNotMatchAnyVersions(string mask, string[] versionList)
        {
            var versions       = versionList.Select(version => SemanticVersion.Parse(version)).ToList();
            var currentVersion = SemanticVersionMask.GetLatestMaskedVersion(mask, versions);

            Assert.IsNull(currentVersion);
        }