File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
test/Discord.Tests.Unit/Utilities Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
- using System . Collections . Generic ;
3
- using System . Text ;
4
2
using Xunit ;
5
3
6
4
namespace Discord . Tests . Unit
@@ -14,11 +12,16 @@ public void Parse()
14
12
var ( resultId , resultName ) = EmoteUtilities . ParseGuildEmote ( input ) ;
15
13
Assert . Equal ( 243902586946715658UL , resultId ) ;
16
14
Assert . Equal ( "gopher" , resultName ) ;
15
+ }
17
16
18
- Assert . Throws < ArgumentException > ( ( ) => EmoteUtilities . ParseGuildEmote ( "foo" ) ) ;
19
- Assert . Throws < ArgumentException > ( ( ) => EmoteUtilities . ParseGuildEmote ( "<foo" ) ) ;
20
- Assert . Throws < ArgumentException > ( ( ) => EmoteUtilities . ParseGuildEmote ( "<:foo" ) ) ;
21
- Assert . Throws < ArgumentException > ( ( ) => EmoteUtilities . ParseGuildEmote ( "<:foo>" ) ) ;
17
+ [ Theory ]
18
+ [ InlineData ( "foo" ) ]
19
+ [ InlineData ( "<foo" ) ]
20
+ [ InlineData ( "<:foo" ) ]
21
+ [ InlineData ( "<:foo>" ) ]
22
+ public void Parse_Fail ( string data )
23
+ {
24
+ Assert . Throws < ArgumentException > ( ( ) => EmoteUtilities . ParseGuildEmote ( data ) ) ;
22
25
}
23
26
24
27
[ Fact ]
You can’t perform that action at this time.
0 commit comments