Пример #1
0
        public void ExceptionAlgorithm()
        {
            var strategy = new ShareFiller();
            var result   = new Collection <PanelItemBase>();

            strategy.AsyncFill(null, result);
        }
Пример #2
0
        public void TestAsyncFill()
        {
            Utils.InitPlugins();
            var    strategy = new ShareFiller();
            string domain   = WorkstationInfo.FromComputer(null).LanGroup;
            var    computer = new ComputerPanelItem(new DomainPanelItem(new DomainRoot(), domain),
                                                    SystemInformation.ComputerName);

            ShareFiller.ShowHiddenShares = true;
            var result = new Collection <PanelItemBase>();

            strategy.AsyncFill(computer, result);
            Assert.Greater(result.Count, 0);
            Assert.IsInstanceOf <SharePanelItem>(result[0]);
            ShareFiller.ShowHiddenShares = false;
            strategy.AsyncFill(computer, result);
        }