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); }
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); }
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); }