Ejemplo n.º 1
0
        public void Initialize_Always_SetsExpectedHierarchyValues()
        {
            // Call
            LogConfigurator.Initialize();

            // Assert
            var hierarchy = (Hierarchy)LogManager.GetRepository();

            Assert.AreEqual(Level.Debug, hierarchy.Root.Level);
            Assert.IsTrue(hierarchy.Configured);
        }
Ejemplo n.º 2
0
        public void Initialize_Always_AddsExpectedLogAppenders()
        {
            // Call
            LogConfigurator.Initialize();

            // Assert
            var hierarchy = (Hierarchy)LogManager.GetRepository();

            Assert.AreEqual(2, hierarchy.Root.Appenders.Count);
            Assert.IsInstanceOf <FileAppender>(hierarchy.Root.Appenders[0]);
            Assert.IsInstanceOf <MessageWindowLogAppender>(hierarchy.Root.Appenders[1]);
        }