예제 #1
0
        public void TimeStamping()
        {
            var state = new ChatState();

            var now = DateTime.UtcNow;

            var aStart = now.AddHours(3);
            var aEnd   = now.AddHours(4);

            var bStart = now;
            var bEnd   = now.AddHours(3);

            var cStart = now.AddHours(1);

            // ---A--
            // BBB---
            // -CCCCC

            var signings = new[]
            {
                new Signing("A", true, false, aStart, aEnd),
                new Signing("B", true, false, bStart, bEnd),
                new Signing("C", true, false, cStart),
            };

            foreach (var signing in signings)
            {
                state = state.AddSigning(signing);
            }

            state.GetTwos().SequenceEqual(
                ImmutableList.Create(signings[1], signings[2]));
        }