void publish_the_video_published_domain_event() { // given EventBusStub eventBus = new EventBusStub(); var videoPublisher = new VideoPublisher(eventBus); var videoTitle = "\uD83C\uDF89 New YouTube.com/CodelyTV video title"; var videoDescription = "This should be the video description \uD83D\uDE42"; // when videoPublisher.Publish(videoTitle, videoDescription); // then var expectedVideoCreated = new VideoPublished(videoTitle, videoDescription); eventBus.ShouldHavePublished(expectedVideoCreated); }
public void Publish() { _videoPublisher.Publish(_videoTitle, _videoDescription); }