コード例 #1
0
        public void NoMessage_ToStringDefaultsToEventNameAndId()
        {
            var eventId = new EventId(15, "Test Event");
            var entry   = new GraphLogEntry(eventId);

            Assert.AreEqual("Test Event (Id: 15)", entry.ToString());
        }
コード例 #2
0
        public void BasicPropertyCheck()
        {
            var dt = DateTime.UtcNow;

            var eventId = new EventId(15, "Test Event");
            var entry   = new GraphLogEntry(eventId, "Test Message");

            Assert.IsTrue(entry.DateTimeUTC > dt);
            Assert.AreEqual(eventId.Id, entry.EventId);
            Assert.AreEqual(eventId.Name, entry.EventName);
            Assert.AreEqual("Test Message", entry.Message);
            Assert.IsNotNull(entry.LogEntryId);
            Assert.AreEqual("Test Message", entry.ToString());
        }
コード例 #3
0
        public void NoMessageNoEventName_ToStringDefaultsToEventId()
        {
            var entry = new GraphLogEntry(5);

            Assert.AreEqual("Id: 5", entry.ToString());
        }