Beispiel #1
0
        public void ShouldNotifyListeners()
        {
            //Arrange
            var user1 = new User1();
            var user2 = new User2();

            videoCreator.RegisterListener(user1);
            videoCreator.RegisterListener(user2);

            //Act
            videoCreator.NewVideoAdd(new MyYoutubeChannel {
                Id = 4, VideoLink = "part4"
            });
            //Assert
            user1.IsReceived.Should().BeTrue();
            user2.IsReceived.Should().BeTrue();
        }