예제 #1
0
        public void NullTest1()
        {
            Assert.Throws <ArgumentNullException>(() =>
                                                  PackagesConfigLocator.FindAndLoadConfigs(null, SlnItems.PackagesConfig).ToArray()
                                                  );

            Assert.Throws <ArgumentNullException>(() =>
                                                  PackagesConfigLocator.FindConfigs(null, SlnItems.PackagesConfig).ToArray()
                                                  );
        }
예제 #2
0
        public void FindTest1(string file, SlnItems items)
        {
            using Sln sln = new(file, items);
            IEnumerable <string> pkgs = PackagesConfigLocator.FindConfigs(sln.Result, sln.Result.ResultType);

            Assert.Equal(sln.Result.PackagesConfigs.Count(), pkgs.Count());

            int idx = 0;

            foreach (var config in sln.Result.PackagesConfigs)
            {
                Assert.Equal(config.File, pkgs.ElementAt(idx++));
            }
        }