示例#1
0
        public void GivenAConnectedUserWithManyConnections_ThenTheJoinedAtDatetimeShouldBeTheTimestampOfTheFirstConnection()
        {
            var chat = new ChatRoom();
            chat.Connect("username", Now.AddMinutes(-2), DummyConnectionId());
            chat.Connect("username", Now.AddMinutes(-1), DummyConnectionId());

            chat.Connect("username", Now, DummyConnectionId());

            chat.ConnectedUserByUsername("username").Value
                .JoinedAt.Should().Be(Now.AddMinutes(-2));
        }