Bug fixes
This commit is contained in:
@@ -57,14 +57,14 @@ namespace Discord.Net.Tests
|
|||||||
{
|
{
|
||||||
Channel channel = null;
|
Channel channel = null;
|
||||||
string name = $"#test_{_random.Next()}";
|
string name = $"#test_{_random.Next()}";
|
||||||
AssertEvent<DiscordClient.ChannelEventArgs>(
|
AssertEvent<ChannelEventArgs>(
|
||||||
"ChannelCreated event never received",
|
"ChannelCreated event never received",
|
||||||
() => channel = _hostClient.CreateChannel(_testServer, name.Substring(1), type).Result,
|
() => channel = _hostClient.CreateChannel(_testServer, name.Substring(1), type).Result,
|
||||||
x => _targetBot.ChannelCreated += x,
|
x => _targetBot.ChannelCreated += x,
|
||||||
x => _targetBot.ChannelCreated -= x,
|
x => _targetBot.ChannelCreated -= x,
|
||||||
(s, e) => e.Channel.Name == name);
|
(s, e) => e.Channel.Name == name);
|
||||||
|
|
||||||
AssertEvent<DiscordClient.ChannelEventArgs>(
|
AssertEvent<ChannelEventArgs>(
|
||||||
"ChannelDestroyed event never received",
|
"ChannelDestroyed event never received",
|
||||||
() => _hostClient.DestroyChannel(channel),
|
() => _hostClient.DestroyChannel(channel),
|
||||||
x => _targetBot.ChannelDestroyed += x,
|
x => _targetBot.ChannelDestroyed += x,
|
||||||
@@ -98,7 +98,7 @@ namespace Discord.Net.Tests
|
|||||||
public void TestSendMessage()
|
public void TestSendMessage()
|
||||||
{
|
{
|
||||||
string text = $"test_{_random.Next()}";
|
string text = $"test_{_random.Next()}";
|
||||||
AssertEvent<DiscordClient.MessageEventArgs>(
|
AssertEvent<MessageEventArgs>(
|
||||||
"MessageCreated event never received",
|
"MessageCreated event never received",
|
||||||
() => _hostClient.SendMessage(_testServerChannel, text),
|
() => _hostClient.SendMessage(_testServerChannel, text),
|
||||||
x => _targetBot.MessageCreated += x,
|
x => _targetBot.MessageCreated += x,
|
||||||
|
|||||||
Reference in New Issue
Block a user