Example #1
0
        public void TestIsIgnore()
        {
            var entry = new UnityLogEntry(null, null, (LogType)100000);

            Assert.AreEqual(true, entry.IsIgnore(typeof(UnityConsoleLogHandler)));
            Assert.AreEqual(false, entry.IsIgnore(typeof(StdOutLogHandler)));
        }
Example #2
0
        public void TestInvalidLogTypeStack()
        {
            var entry = new UnityLogEntry(null, null, (LogType)100000);

            Assert.AreEqual(LogLevels.Emergency, entry.Level);
            Assert.AreEqual("[LogType Invalid]", entry.Message);
        }
Example #3
0
        public void TestGetCallStack()
        {
            var entry = new UnityLogEntry("helloworld", "hello\nworld", LogType.Log);

            Assert.AreEqual("hello", entry.GetStackTrace()[0]);
            Assert.AreEqual("world", entry.GetStackTrace()[1]);
        }
Example #4
0
        public void TestNullStack()
        {
            var entry = new UnityLogEntry(null, null, LogType.Log);

            Assert.AreEqual(0, entry.GetStackTrace().Length);
        }
Example #5
0
        public void TestNullMessage()
        {
            var entry = new UnityLogEntry(null, "hello\nworld", LogType.Log);

            Assert.AreEqual(string.Empty, entry.Message);
        }