Example #1
0
        public void LogWarningEvent()
        {
            var expected = new BuildWarningEventArgs(
                "subcategory",
                "code",
                "file",
                0,
                1,
                2,
                3,
                "message",
                "helpKeyword",
                "senderName");

            BuildEventArgs        anyEvent     = null;
            BuildWarningEventArgs warningEvent = null;

            _engine.AnyEventRaised += (sender, args) =>
            {
                Assert.AreEqual(_engine, sender);
                anyEvent = args;
            };

            _engine.WarningRaised += (sender, args) =>
            {
                Assert.AreEqual(_engine, sender);
                warningEvent = args;
            };

            _engine.LogWarningEvent(expected);

            Assert.AreEqual(expected, anyEvent);
            Assert.AreEqual(expected, warningEvent);
        }
Example #2
0
        public void Warning()
        {
            _engine.LogWarningEvent(new BuildWarningEventArgs(
                                        "subcategory",
                                        "code",
                                        "file",
                                        0,
                                        1,
                                        2,
                                        3,
                                        "message",
                                        "helpKeyword",
                                        "senderName"));

            LogAssert.Expect(LogType.Warning, "file : subcategory warning code: message");
        }