public void TestAssignment()
        {
            LoggerExtension le = new LoggerExtension();

            Assert.IsNull(le.Parameters, "A1");
            Assert.AreEqual(LoggerVerbosity.Quiet, le.Verbosity, "A2");

            le.Parameters = "a;b";
            le.Verbosity  = LoggerVerbosity.Detailed;

            Assert.AreEqual("a;b", le.Parameters, "A3");
            Assert.AreEqual(LoggerVerbosity.Detailed, le.Verbosity, "A4");
        }
Ejemplo n.º 2
0
		public void TestAssignment ()
		{
			LoggerExtension le = new LoggerExtension ();

			Assert.IsNull (le.Parameters, "A1");
			Assert.AreEqual (LoggerVerbosity.Quiet, le.Verbosity, "A2");

			le.Parameters = "a;b";
			le.Verbosity = LoggerVerbosity.Detailed;

			Assert.AreEqual ("a;b", le.Parameters, "A3");
			Assert.AreEqual (LoggerVerbosity.Detailed, le.Verbosity, "A4");
		}
        public void TestFormatErrorEvent2()
        {
            LoggerExtension le              = new LoggerExtension();
            string          subcategory     = "subcategory";
            string          code            = "code";
            string          file            = "file";
            int             lineNumber      = 1;
            int             columnNumber    = 0;
            int             endLineNumber   = 0;
            int             endColumnNumber = 0;
            string          message         = "message";
            string          helpKeyword     = "helpKeyword";
            string          senderName      = "senderName";

            BuildErrorEventArgs beea = new BuildErrorEventArgs(
                subcategory, code, file, lineNumber, columnNumber,
                endLineNumber, endColumnNumber, message, helpKeyword, senderName);

            Assert.AreEqual("file(1): subcategory error code: message", le.FormatErrorEvent(beea), "A1");
        }
        public void TestIsVerbosityAtLeast()
        {
            LoggerExtension le = new LoggerExtension();

            le.Verbosity = LoggerVerbosity.Quiet;
            Assert.IsTrue(le.IsVerbosityAtLeast(LoggerVerbosity.Quiet), "A1");
            Assert.IsFalse(le.IsVerbosityAtLeast(LoggerVerbosity.Minimal), "A2");

            le.Verbosity = LoggerVerbosity.Minimal;
            Assert.IsTrue(le.IsVerbosityAtLeast(LoggerVerbosity.Minimal), "A3");
            Assert.IsFalse(le.IsVerbosityAtLeast(LoggerVerbosity.Normal), "A4");

            le.Verbosity = LoggerVerbosity.Normal;
            Assert.IsTrue(le.IsVerbosityAtLeast(LoggerVerbosity.Normal), "A5");
            Assert.IsFalse(le.IsVerbosityAtLeast(LoggerVerbosity.Detailed), "A6");

            le.Verbosity = LoggerVerbosity.Detailed;
            Assert.IsTrue(le.IsVerbosityAtLeast(LoggerVerbosity.Detailed), "A7");
            Assert.IsFalse(le.IsVerbosityAtLeast(LoggerVerbosity.Diagnostic), "A8");
        }
Ejemplo n.º 5
0
		public void TestFormatErrorEvent2 ()
		{
			LoggerExtension le = new LoggerExtension ();
			string subcategory = "subcategory";
			string code = "code";
			string file = "file";
			int lineNumber = 1;
			int columnNumber = 0;
			int endLineNumber = 0;
			int endColumnNumber = 0;
			string message = "message";
			string helpKeyword = "helpKeyword";
			string senderName = "senderName";

			BuildErrorEventArgs beea = new BuildErrorEventArgs (
				subcategory, code, file, lineNumber, columnNumber,
				endLineNumber, endColumnNumber, message, helpKeyword, senderName);

			Assert.AreEqual ("file(1): subcategory error code: message", le.FormatErrorEvent (beea), "A1");
		}
Ejemplo n.º 6
0
		public void TestIsVerbosityAtLeast ()
		{
			LoggerExtension le = new LoggerExtension ();

			le.Verbosity = LoggerVerbosity.Quiet;
			Assert.IsTrue (le.IsVerbosityAtLeast (LoggerVerbosity.Quiet), "A1");
			Assert.IsFalse (le.IsVerbosityAtLeast (LoggerVerbosity.Minimal), "A2");

			le.Verbosity = LoggerVerbosity.Minimal;
			Assert.IsTrue (le.IsVerbosityAtLeast (LoggerVerbosity.Minimal), "A3");
			Assert.IsFalse (le.IsVerbosityAtLeast (LoggerVerbosity.Normal), "A4");

			le.Verbosity = LoggerVerbosity.Normal;
			Assert.IsTrue (le.IsVerbosityAtLeast (LoggerVerbosity.Normal), "A5");
			Assert.IsFalse (le.IsVerbosityAtLeast (LoggerVerbosity.Detailed), "A6");

			le.Verbosity = LoggerVerbosity.Detailed;
			Assert.IsTrue (le.IsVerbosityAtLeast (LoggerVerbosity.Detailed), "A7");
			Assert.IsFalse (le.IsVerbosityAtLeast (LoggerVerbosity.Diagnostic), "A8");
		}