Exemple #1
0
        public void GetAllIsNotReferenced()
        {
            LogListenersContainer item = new LogListenersContainer();

            List <LogListenerDecorator> list = item.GetAll();

            list.Add(null);

            int count = item.GetAll().Count;

            Assert.AreEqual(1, list.Count);
            Assert.AreEqual(0, count);
        }
Exemple #2
0
        public void LogListenersAreEmpty()
        {
            LogListenersContainer item = new LogListenersContainer();

            int count = item.GetAll().Count;

            Assert.AreEqual(0, count);
        }
Exemple #3
0
        public void AddLogListenersUpdatesTheList()
        {
            LogListenersContainer item = new LogListenersContainer();

            item.Add(new CustomLogListener());

            int count = item.GetAll().Count;

            Assert.AreEqual(1, count);
        }
Exemple #4
0
        public void AddNullLogListenersIsIgnored()
        {
            LogListenersContainer item = new LogListenersContainer();

            item.Add(null);

            int count = item.GetAll().Count;

            Assert.AreEqual(0, count);
        }