1+ using Moq ;
2+
3+ using Nullinside . Api . Common . Twitch ;
4+ using Nullinside . Api . TwitchBot . ChatRules ;
5+ using Nullinside . Api . TwitchBot . Model ;
6+
7+ namespace Nullinside . Api . TwitchBot . Tests . ChatRules ;
8+
9+ /// <summary>
10+ /// Tests the <see cref="Dogehype" /> class.
11+ /// </summary>
12+ public class PeakPyTests : AChatRuleUnitTestBase < PeakPy > {
13+ /// <summary>
14+ /// Tests the strings typed in chats.
15+ /// </summary>
16+ /// <param name="badString">The string that should fail.</param>
17+ [ Test ]
18+ [ TestCase ( "@blackysing Sup, your stream could use some hype PeakPy .com fills it quick (remove the space) @4KB," ) ]
19+ [ TestCase ( "@ethuins Yo dude, saw your stream's kinda dead rn PeakPy .com can pump some real eyes in there quick (remove the space) @cMr," ) ]
20+ [ TestCase ( "@floridean Sup, your stream could use some hype PeakPy .com can pump some real followers in there quick (remove the space) @sR4n35hG," ) ]
21+ [ TestCase ( "@floridean Yo, chat's quiet, PeakPy .com brings real viewers instantly (remove the space) @sN3ZZtgF," ) ]
22+ public async Task TestKnownStrings ( string badString ) {
23+ var rule = new PeakPy ( ) ;
24+ var botProxy = new Mock < ITwitchApiProxy > ( ) ;
25+ var chat = new TwitchChatMessage ( true , badString , "123" , "456" ) ;
26+
27+ // Process the message and assert that we fail the message.
28+ bool result = await rule . Handle ( "123" , botProxy . Object , chat , _db ) . ConfigureAwait ( false ) ;
29+ Assert . That ( result , Is . False ) ;
30+ }
31+ }
0 commit comments