Beispiel #1
0
        public void CanTrackDeowlSuccess()
        {
            var messages = new List<LogMessage>
            {
                new LogMessage(new DateTime(2013, 12, 24, 23, 55, 0), "Rarity", "Sweetiebot: deowl because reasons"),
                new KickedMessage(new DateTime(2013, 12, 25, 0, 0, 0), ":owl", ":sweetiestare:"),
            };

            var tracker = new DeowlTracker();
            var deowls = tracker.Run(messages);

            var expected = new List<Deowl> { new Deowl("Rarity", true) };

            Assert.Equal(expected, deowls);
        }
Beispiel #2
0
        public void CanTrackDeowlFailure()
        {
            var messages = new List<LogMessage>
            {
                new LogMessage(new DateTime(2013, 12, 24, 23, 55, 0), "Rarity", "Sweetiebot: deowl because reasons"),
                new LogMessage(new DateTime(2013, 12, 25, 0, 0, 0), "Sweetiebot", "I'm tired. Maybe another time?"),
            };

            var tracker = new DeowlTracker();
            var deowls = tracker.Run(messages);

            var expected = new List<Deowl> { new Deowl("Rarity", false) };

            Assert.Equal(expected, deowls);
        }
Beispiel #3
0
 private static IEnumerable<Deowl> GetDeowls(List<LogMessage> messages)
 {
     var tracker = new DeowlTracker();
     var deowls = tracker.Run(messages);
     return deowls;
 }