Beispiel #1
0
        public void GetFiles_ShouldReturnEmptyListIfNoMatch()
        {
            string[] res = null;

            _sut.RunWorkerAsync();

            bool completed = false;

            _sut.RunWorkerCompleted += (sender, args) =>
            {
                res       = _sut.GetFiles("X");
                completed = true;
            };

            while (!completed)
            {
                Thread.CurrentThread.Join(100);
            }
            res.Length.Should().Be.EqualTo(0);
        }