Пример #1
0
        public void ProcessDisplay()
        {
            var             writer = new CsvFileWriter(m_WriteFile, CancellationToken.None);
            IProcessDisplay prc    = new MockProcessDisplay
            {
                Maximum = 100
            };

            writer.ProcessDisplay = prc;
            int num = 0;

            prc.Progress += delegate(object sender, ProgressEventArgs e)
            {
                num = e.Value;
            };
            writer.HandleProgress("hello", 56);
            Assert.AreEqual(56, num);
        }