예제 #1
0
        public async Task ShouldCreateConference()
        {
            // Arrange
            var createConferenceCommand = new Conferences.Create.Command
            {
                Name = "Testowa konferencja"
            };
            var getConferenceQuery = new Conferences.Get.Query
            {
                Name = createConferenceCommand.Name
            };

            // Act
            var createConferenceResponse = await Send(createConferenceCommand);

            var getConferenceResponse = await Send(getConferenceQuery);

            // Assert
            createConferenceResponse.Succeeded.ShouldBeTrue();
            getConferenceResponse.Conference.ShouldNotBeNull();
            getConferenceResponse.Conference.Name.ShouldBe(createConferenceCommand.Name);
            PublishedEvents.ShouldContain <ConferenceCreatedEvent>();
        }