public void Factories_SubstituteLoggerFactory_GetLoggerNameListTest() { SubstituteLoggerFactory target = new SubstituteLoggerFactory(); string name = "foo"; IList<string> actual; actual = target.GetLoggerNameList(); Assert.AreEqual(0, actual.Count); target.GetLogger(name).Debug("test 1"); actual = target.GetLoggerNameList(); Assert.AreEqual(1, actual.Count); Assert.AreEqual(name, actual[0]); name = "bar"; target.GetLogger(name).Debug("test 2"); actual = target.GetLoggerNameList(); Assert.AreEqual(2, actual.Count); Assert.AreEqual(name, actual[1]); }
public void Factories_SubstituteLoggerFactory_GetLoggerTest() { SubstituteLoggerFactory target = new SubstituteLoggerFactory(); string name = "foo"; ILogger expected = NOPLogger.Instance; ILogger actual; actual = target.GetLogger(name); Assert.AreEqual(expected, actual); }