예제 #1
0
        public void DirectoryScanned_Cancelled_RaisedWithDirectorySkipped()
        {
            cleaner.Cancel();

            DirectorySkippedEventArgs args = null;

            cleaner.DirectoryScanned += (s, e) => args = e as DirectorySkippedEventArgs;

            cleaner.Clean(directory);

            Assert.That(args, Is.Not.Null);
            Assert.That(args.Directory, Is.EqualTo(directory));
            Assert.That(args.Exception, Is.TypeOf <UserCancelledException>());
        }