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); } }
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; }
public void TestFileWriter() { IStackItem itm = _xfr.GetNextStackItem(); _hfw.WriteHtmlFile(itm); }