示例#1
0
        public ChannelChatFixture(TestsFixture testsFixture, string collectionName)
        {
            _testsFixture = testsFixture;

            AddLifetime(
                initialize: async() =>
            {
                _testsFixture.ChannelChat ??= await GetChat(collectionName);
                ChannelChat = _testsFixture.ChannelChat;

                ChannelChatId = ChannelChat.Username is null
                        ? ChannelChat.Id.ToString()
                        : $"@{ChannelChat.GetSafeUsername()}";

                await _testsFixture.SendTestCollectionNotificationAsync(
                    collectionName,
                    $"Tests will be executed in channel {ChannelChatId}"
                    );
            }
                );
        }