public void Return_False_When_Compare_VideoPublished_Event_With_Null()
        {
            // given
            VideoPublished videoPublished = new VideoPublished(SomeVideoTitle, SomeVideoDescription);

            // when
            bool result = videoPublished.Equals(null);

            // then
            result.Should().BeFalse();
        }
        public void Return_False_When_Compare_Different_VideoPublished_Event()
        {
            // given
            VideoPublished videoPublishedOne = new VideoPublished(SomeVideoTitle, SomeVideoDescription);
            VideoPublished videoPublishedTwo = new VideoPublished(AnotherVideoTitle, AnotherVideoDescription);

            // when
            bool result = videoPublishedOne.Equals(videoPublishedTwo);

            // then
            result.Should().BeFalse();
        }
        public void Return_True_When_Compare_The_Same_VideoPublished_Event()
        {
            // given
            VideoPublished videoPublishedOne = new VideoPublished(SomeVideoTitle, SomeVideoDescription);
            VideoPublished videoPublishedTwo = new VideoPublished(SomeVideoTitle, SomeVideoDescription);

            // when
            bool result = videoPublishedOne.Equals(videoPublishedTwo);

            // then
            result.Should().BeTrue();
        }
Exemple #4
0
        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);
        }
Exemple #5
0
 public void ShouldHavePublished(VideoPublished expectedVideoCreated)
 {
     //throw new System.NotImplementedException();
 }