예제 #1
0
        public void NoPropertiesAreRequiredOnASourceEvent()
        {
            var template  = Handlebars.Handlebars.Compile("No properties");
            var id        = Some.EventId();
            var timestamp = Some.UtcTimestamp();
            var data      = new Event <LogEventData>(id, Some.EventType(), timestamp, new LogEventData
            {
                Exception       = null,
                Id              = id,
                Level           = LogEventLevel.Fatal,
                LocalTimestamp  = new DateTimeOffset(timestamp),
                MessageTemplate = "Some text",
                RenderedMessage = "Some text",
                Properties      = null
            });
            var result = EmailReactor.FormatTemplate(template, data, Some.Host());

            Assert.Equal("No properties", result);
        }