public void CreatesMergedIntervalsForCloseEvents()
        {
            var sut = new UserActiveTransformer(_context, TimeSpan.FromMinutes(16));

            sut.ProcessEvent(TestIDEEvent(0, 5, "a"));
            sut.ProcessEvent(TestIDEEvent(3, 6, "a"));
            sut.ProcessEvent(TestIDEEvent(9, 10, "a"));
            sut.ProcessEvent(TestIDEEvent(26, 30, "a"));

            CollectionAssert.AreEqual(new[] { ExpectedInterval(0, 30, "a") }, sut.SignalEndOfEventStream());
        }
        public void CreatesSeperateIntervalsForEventsThatAreFurtherApart()
        {
            var sut = new UserActiveTransformer(_context, TimeSpan.FromMinutes(16));

            sut.ProcessEvent(TestIDEEvent(0, 10, "a"));
            sut.ProcessEvent(TestIDEEvent(27, 30, "a"));

            CollectionAssert.AreEqual(
                new[] { ExpectedInterval(0, 10, "a"), ExpectedInterval(27, 30, "a") },
                sut.SignalEndOfEventStream());
        }
        public void CreatesIntervalWithIdenticalTimeDataForSingleEvent()
        {
            var sut = new UserActiveTransformer(_context, TimeSpan.FromMinutes(16));

            sut.ProcessEvent(TestIDEEvent(0, 5, "a"));

            CollectionAssert.AreEqual(new[] { ExpectedInterval(0, 5, "a") }, sut.SignalEndOfEventStream());
        }