Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions src/Nullinside.Api.TwitchBot.Tests/ChatRules/DoghypeTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using Moq;

using Nullinside.Api.Common.Twitch;
using Nullinside.Api.TwitchBot.ChatRules;

namespace Nullinside.Api.TwitchBot.Tests.ChatRules;

/// <summary>
/// Tests the <see cref="Dogehype" /> class.
/// </summary>
public class DogehypeTests : AChatRuleUnitTestBase<Dogehype> {
/// <summary>
/// Tests the strings typed in chats.
/// </summary>
/// <param name="badString">The string that should fail.</param>
[Test]
[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")]
public async Task TestKnownStrings(string badString) {
var rule = new Dogehype();
var botProxy = new Mock<ITwitchApiProxy>();
var chat = new TwitchChatMessage(true, badString, "123", "456");

// Process the message and assert that we fail the message.
bool result = await rule.Handle("123", botProxy.Object, chat, _db);
Assert.That(result, Is.False);
}
}
Loading