コード例 #1
0
        public async Task ShouldStopEventChannelOnUnitialization()
        {
            var data = TestHelper.CreateApplicationEndpoint();
            Mock <IEventChannel> mockEventChannel    = data.EventChannel;
            ApplicationEndpoint  applicationEndpoint = data.ApplicationEndpoint;
            await applicationEndpoint.InitializeAsync(new LoggingContext(Guid.NewGuid())).ConfigureAwait(false);

            // When
            applicationEndpoint.Uninitialize();

            // Then
            mockEventChannel.Verify(foo => foo.TryStopAsync(), Times.Once);
        }