public void can_handle_domain_event()
        {
            var slackStub = new SlackFacadeStub(false);
            var capabilityRepositoryStub = new StubCapabilityRepository(new List <Guid>());
            var sut       = new SlackAwsContextAccountCreatedEventHandler(slackStub, capabilityRepositoryStub);
            var eventData = DomainEventBuilder.BuildAWSContextAccountCreatedEventData();
            var @event    = new AWSContextAccountCreatedDomainEvent(eventData);

            sut.HandleAsync(@event);

            Assert.True(slackStub.SendNotificationToChannelCalled);
        }
        public void can_create_valid_AWSContextAccountCreatedDomainEvent_when_given_GeneralDomainEvent()
        {
            // Arrange
            var generalDomainEvent = DomainEventBuilder.BuildAWSContextAccountCreatedEventData();

            // Act
            var awsContextAccountCreatedDomainEvent = new AWSContextAccountCreatedDomainEvent(generalDomainEvent);


            // Assert
            Assert.Equal(DomainEventBuilder.ContextId, awsContextAccountCreatedDomainEvent.Payload.ContextId);
            Assert.Equal(DomainEventBuilder.ContextName, awsContextAccountCreatedDomainEvent.Payload.ContextName);
            Assert.Equal(DomainEventBuilder.CapabilityName, awsContextAccountCreatedDomainEvent.Payload.CapabilityName);
            Assert.Equal(DomainEventBuilder.CapabilityId, awsContextAccountCreatedDomainEvent.Payload.CapabilityId);
            Assert.Equal(DomainEventBuilder.CapabilityRootId, awsContextAccountCreatedDomainEvent.Payload.CapabilityRootId);
            Assert.Equal(DomainEventBuilder.RoleArn, awsContextAccountCreatedDomainEvent.Payload.RoleArn);
            Assert.Equal(DomainEventBuilder.RoleEmail, awsContextAccountCreatedDomainEvent.Payload.RoleEmail);
            Assert.Equal(DomainEventBuilder.AccountId, awsContextAccountCreatedDomainEvent.Payload.AccountId);
        }