public void MessagesAt12_34_AreAlways_At12_34()
        {
            var anyDateTime = "0";

            var timestamp = new ContextInserterBuilder().InsertAt("12:34").PublicMessage().CreateAt(anyDateTime).Build().Single().Timestamp;

            Assert.AreEqual(timestamp, DateTimeZero.AddHours(12).AddMinutes(34));
        }
        public void MessagesAt0_04_AreAlways_At4Minutes()
        {
            var anyDateTime = "0";

            var timestamp = new ContextInserterBuilder().InsertAt("0:04").PublicMessage().CreateAt(anyDateTime).Build().Single().Timestamp;

            Assert.AreEqual(timestamp, DateTimeZero.AddMinutes(4));
        }
        public void MessagesAt00_00_01_AreAlways_At1Second()
        {
            var anyDateTime = "0";

            var timestamp = new ContextInserterBuilder().InsertAt("00:00:01").PublicMessage().CreateAt(anyDateTime).Build().Single().Timestamp;

            Assert.AreEqual(timestamp, DateTimeZero.AddSeconds(1));
        }
        public void CreatedAt_1_00_IsCreatedAt1hour()
        {
            var inserter = new ContextInserterBuilder()
                           .InsertAt("0").ModMessage()
                           .CreateAt("1:00");

            Assert.AreEqual(DateTimeZero.AddHours(1), inserter.CreatedAt);
        }
        public void NextTimestamp_With3MessagesSpacedBy1Hour_Yields4Hours()
        {
            var appender = new ContextAppenderBuilder(TimeSpan.FromHours(1))
                           .PublicMessage()
                           .TargetedMessage()
                           .ModMessage();

            var nextTimestamp = appender.NextTimestamp();

            Assert.AreEqual(DateTimeZero.AddHours(4), nextTimestamp);
        }
        public void SubsequentlySpacedBy_1HourWith3Messages_AreAt123Hours()
        {
            var context = new ContextAppenderBuilder(TimeSpan.FromHours(1))
                          .PublicMessage()
                          .TargetedMessage()
                          .ModMessage().Build();

            Assert.AreEqual(DateTimeZero.AddHours(1), context[0].Timestamp);
            Assert.AreEqual(DateTimeZero.AddHours(2), context[1].Timestamp);
            Assert.AreEqual(DateTimeZero.AddHours(3), context[2].Timestamp);
        }