File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
tests/ImageSharp.Web.Tests/Commands Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -95,13 +95,22 @@ public class CommandParserTests
9595 [ MemberData ( nameof ( IntegralLists ) ) ]
9696 [ MemberData ( nameof ( RealLists ) ) ]
9797 [ MemberData ( nameof ( ColorValues ) ) ]
98- public void CommandParses < T > ( T expected , string param )
98+ public void CommandParserCanConvert < T > ( T expected , string param )
9999 {
100100 T sb = Parser . ParseValue < T > ( param , CultureInfo . InvariantCulture ) ;
101101 Assert . IsType < T > ( sb ) ;
102102 Assert . Equal ( expected , sb ) ;
103103 }
104104
105+ [ Fact ]
106+ public void CommandParseThrowsCorrectly ( )
107+ {
108+ var emptyParser = new CommandParser ( Array . Empty < ICommandConverter > ( ) ) ;
109+
110+ Assert . Throws < NotSupportedException > (
111+ ( ) => emptyParser . ParseValue < bool > ( "true" , CultureInfo . InvariantCulture ) ) ;
112+ }
113+
105114 private static CommandParser GetCommandParser ( )
106115 {
107116 var commands = new List < ICommandConverter >
You can’t perform that action at this time.
0 commit comments