File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
test/MsgPack.UnitTest/Serialization Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -540,6 +540,12 @@ public void TestIssue269()
540540 Assert . That ( target . UnderlyingType , Is . EqualTo ( typeof ( MessagePackExtendedTypeObject ) ) ) ;
541541 Assert . That ( target . IsTypeOf < byte [ ] > ( ) , Is . False ) ;
542542 Assert . That ( target . IsTypeOf < MessagePackExtendedTypeObject > ( ) , Is . True ) ;
543+
544+ var forBinary = Assert . Throws < InvalidOperationException > ( ( ) => target . AsBinary ( ) ) ;
545+ Assert . That ( forBinary . Message , Is . EqualTo ( "Do not convert MsgPack.MessagePackExtendedTypeObject MessagePackObject to System.Byte[]." ) ) ;
546+
547+ var forString = Assert . Throws < InvalidOperationException > ( ( ) => target . AsString ( ) ) ;
548+ Assert . That ( forString . Message , Is . EqualTo ( "Do not convert MsgPack.MessagePackExtendedTypeObject MessagePackObject to System.String." ) ) ;
543549 }
544550 }
545551}
You can’t perform that action at this time.
0 commit comments