예제 #1
0
        public XmlFileReaderTest()
        {
            _reader = new ConfigurationReader();
            IFileSystemHelper fsh = (IFileSystemHelper)(new Mock <FileSystemHelper>().Object);

            _xfr           = new XmlFileReader(_reader.GetXmlFilesDirectory(), _reader.GetXmlFilesProcessedDirectory(), fsh);
            _numberOfFiles = _reader.GetXmlFilesDirectory().GetFiles().Length;
            _stackItems    = new List <IStackItem>();
            while (_xfr.GetNextStackItem() != null)
            {
                IStackItem si = _xfr.GetNextStackItem();
                _stackItems.Add(si);
            }
        }
예제 #2
0
        public void Process()
        {
            XmlFileReader xfr           = new XmlFileReader(_producerConsumer.GetConfigurationReader().GetXmlFilesDirectory(), _producerConsumer.GetConfigurationReader().GetXmlFilesProcessedDirectory(), _producerConsumer.FileSystemHelper);;
            int           numberOfFiles = _producerConsumer.GetConfigurationReader().GetXmlFilesDirectory().GetFiles().Length;

            while (xfr.GetNextStackItem() != null)
            {
                IStackItem si = xfr.GetNextStackItem();
                _producerConsumer.Queue.Enqueue(si);
                //_producerConsumer.lollypop.Set();
                _producerConsumer.IsDoneReading = false;
            }
            _producerConsumer.IsDoneReading = true;
        }
예제 #3
0
        public void TestFileWriter()
        {
            IStackItem itm = _xfr.GetNextStackItem();

            _hfw.WriteHtmlFile(itm);
        }