public void Scan_Should_Fire_Associated_Callbacks()
        {
            var reader = new AssociativeReader(_testLogger, _xmlReader,
                                               new ScopeHandler("R",
                                                                new ScopeHandler("A", _a),
                                                                new ScopeHandler("B", _b)));

            reader.Scan();

            A.CallTo(() => _a(_xmlReader)).MustHaveHappened();
            A.CallTo(() => _b(_xmlReader)).MustHaveHappened();
        }
        public void Lack_Of_Mandatory_Element_Should_Log_Errors()
        {
            var reader = new AssociativeReader(_testLogger, _xmlReader,
                                               new ScopeHandler("R",
                                                                new ScopeHandler("D")
            {
                Mandatory = true,
            }));

            reader.Scan();

            _testLogger.DequeueMessages().Should()
            .Equal("[Error] Mandatory handler is not found: D");
        }