예제 #1
0
        public void TestLoad()
        {
            var stream   = File.OpenRead(@"..\..\..\feed\unsafepackages.xml");
            var loader   = new PackageListLoader();
            var packages = loader.LoadPackages(stream);

            Assert.IsTrue(packages.Count > 5);
        }
예제 #2
0
        public void TestLoad()
        {
            var stream   = new MemoryStream(Encoding.UTF8.GetBytes(Properties.TestResources.unsafepackages));
            var loader   = new PackageListLoader();
            var packages = loader.LoadPackages(stream);

            Assert.AreEqual(1, packages.Count);
            Assert.IsTrue(packages.Exists(p => p.Id == "AntiXss" && p.Before == "4.2.1"));
        }