示例#1
0
        public void no_version()
        {
            var q = new PackageQualityVector(Enumerable.Empty <SVersion>(), false);

            q.ToString().Should().Be("");
            q.IsValid.Should().BeFalse();
            q.ActualCount.Should().Be(0);
        }
示例#2
0
        public void collecting_multiple_versions(string versions, string result)
        {
            var v = versions.Split(',').Select(x => SVersion.Parse(x.Trim())).ToArray();
            var q = new PackageQualityVector(v, false);

            q.ToString().Should().Be(result);
            q.ActualCount.Should().Be(result.Count(c => c == '/') + 1);
        }
示例#3
0
        public void collecting_best_version(string versions, string result)
        {
            var v = versions.Split(',').Select(x => SVersion.Parse(x.Trim())).ToArray();
            var q = new PackageQualityVector(v, false);

            q.ToString().Should().Be(result);
            q.IsValid.Should().Be(result.Length > 0);
            q.ActualCount.Should().Be(result.Length > 0 ? 1 : 0);
        }