Ejemplo n.º 1
0
        public Cleaner(IPreprocessingIo io, ICleanerLogger log)
        {
            _io  = io;
            _log = log;

            _log.WorkingIn(io.GetFullPath_Merged(""), io.GetFullPath_Out(""));

            Filters = new HashSet <IFilter>();
            Fixers  = new HashSet <IFixer>();
        }
Ejemplo n.º 2
0
        public void Setup()
        {
            _reportedCounts    = new List <IDictionary <string, int> >();
            _registeredFilters = Lists.NewList <string>();
            _registeredFixers  = Lists.NewList <string>();

            _log = Mock.Of <ICleanerLogger>();
            Mock.Get(_log)
            .Setup(l => l.FinishedWriting(It.IsAny <IDictionary <string, int> >()))
            .Callback <IDictionary <string, int> >(d => _reportedCounts.Add(d));
            Mock.Get(_log)
            .Setup(l => l.RegisteredConfig(It.IsAny <IEnumerable <string> >(), It.IsAny <IEnumerable <string> >()))
            .Callback <IEnumerable <string>, IEnumerable <string> >(
                (filters, fixers) =>
            {
                _registeredFilters.AddAll(filters);
                _registeredFixers.AddAll(fixers);
            });

            _sut = new Cleaner(Io, _log);
        }