Skip to content

Commit fd2beb3

Browse files
Adding dogehype test
1 parent 2c9968b commit fd2beb3

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using Moq;
2+
3+
using Nullinside.Api.Common.Twitch;
4+
using Nullinside.Api.TwitchBot.ChatRules;
5+
6+
namespace Nullinside.Api.TwitchBot.Tests.ChatRules;
7+
8+
/// <summary>
9+
/// Tests the <see cref="Dogehype" /> class.
10+
/// </summary>
11+
public class DogehypeTests : AChatRuleUnitTestBase<Dogehype> {
12+
/// <summary>
13+
/// Tests the strings typed in chats.
14+
/// </summary>
15+
/// <param name="badString">The string that should fail.</param>
16+
[Test]
17+
[TestCase("Visit dogehype .biz com today and climb the Twitch rankings with ease! Whether you're just starting out or looking to take your stream to the next level, DogeHype has the tools you need to succeed. @Axxq7ntz")]
18+
public async Task TestKnownStrings(string badString) {
19+
var rule = new Dogehype();
20+
var botProxy = new Mock<ITwitchApiProxy>();
21+
var chat = new TwitchChatMessage(true, badString, "123", "456");
22+
23+
// Process the message and assert that we fail the message.
24+
bool result = await rule.Handle("123", botProxy.Object, chat, _db);
25+
Assert.That(result, Is.False);
26+
}
27+
}

0 commit comments

Comments
 (0)