public void Chatroom_Register_AddMemberAndRegistChatroom()
        {
            //Given

            //When
            var chatroom = new Chatroom();

            chatroom.Register(_george);

            //Then
            Assert.True(chatroom.ExistParticipant(_georgeName));
            Assert.Same(chatroom, _george.Chatroom);
        }
Beispiel #2
0
        public void Chatroom_Register_AddMemberAndRegistChatroom()
        {
            //Given
            var participant = new Participant("George");

            //When
            var chatroom = new Chatroom();

            chatroom.Register(participant);

            //Then
            Assert.True(chatroom.ExistParticipant("George"));
            Assert.Same(participant.Chatroom, chatroom);
        }