Exemple #1
0
        public void Mediator_AddAttendees_IncreaseTheNumberOfAttendees(int totalAttendees)
        {
            // Arrange
            Mediatr mediator = new Mediatr();

            // Act
            for (int i = 0; i < totalAttendees; i++)
            {
                Attendee attendee = new Attendee(mediator);
                mediator.AddAttendees(attendee);
            }

            // Assert
            Assert.Equal(totalAttendees, mediator.GetNumberOfAttendees());
        }
Exemple #2
0
        public void Mediator_WhenPresenterUpdatesImage_AttendeeMustReceive()
        {
            // Arrange
            Mediatr   mediator  = new Mediatr();
            Presenter presenter = new Presenter(mediator);
            Attendee  attendee  = new Attendee(mediator);

            string fakeImageName = "test-image.png";

            // Act
            mediator.AddAttendees(attendee);
            presenter.UpdateImage(fakeImageName);

            // Assert
            Assert.Equal(fakeImageName, attendee.MyActualImage);
        }