public void Should_Succes_When_AddingPhoto_ToMeetup() { var meetup = new Meetup( organizerId: "123", subject: "DDD", when: DateTime.Now.AddDays(1), description: "DDD Practices", location: new Location("YTÜ Teknopark"), policy: meetupPolicy); meetup.Complete(); meetup.AddPhoto("photo.jpg"); Assert.Single(meetup.Photos); }
public void Should_ThrowException_When_AddingPhoto_ToNotCompletedMeetup() { var exception = Assert.Throws <MeetupDomainException>(() => { var meetup = new Meetup( organizerId: "123", subject: "DDD", when: DateTime.Now.AddDays(1), description: "DDD Practices", location: new Location("YTÜ Teknopark"), policy: meetupPolicy); meetup.AddPhoto("photo.jpg"); }); Assert.Equal("Meetup is not completed", exception.Message); }