Пример #1
0
        public void PathTooLongWarning_PackageWithLongPath_Warn()
        {
            using (var packageFile = TestPackagesCore.GetPackageCoreReaderLongPathTestPackage())
            {
                var zip     = TestPackagesCore.GetZip(packageFile);
                var ruleSet = RuleSet.PackageCreationRuleSet;

                using (var reader = new PackageArchiveReader(zip))
                {
                    var issues = new List <PackagingLogMessage>();

                    foreach (var rule in ruleSet)
                    {
                        issues.AddRange(rule.Validate(reader).OrderBy(p => p.Code.ToString(), StringComparer.CurrentCulture));
                    }

                    Assert.True(issues.Any(p => p.Code == NuGetLogCode.NU5123));
                }
            }
        }