File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -751,6 +751,10 @@ public async Task TryConvertTo_Ok()
751751 await client . SendAsync ( data ) ;
752752 await tcs . Task ;
753753 Assert . Null ( noConvertEntity ) ;
754+
755+ var converter = new MockSocketDataConverter ( ) ;
756+ result = converter . TryConvertTo ( new byte [ ] { 0x1 , 0x2 } , out t ) ;
757+ Assert . False ( result ) ;
754758 }
755759
756760 private static TcpListener StartTcpServer ( int port , Func < TcpClient , Task > handler )
@@ -1188,6 +1192,14 @@ class MockEntity
11881192 public string ? Value13 { get ; set ; }
11891193 }
11901194
1195+ class MockSocketDataConverter : SocketDataConverter < MockEntity >
1196+ {
1197+ protected override bool Parse ( ReadOnlyMemory < byte > data , MockEntity entity )
1198+ {
1199+ return false ;
1200+ }
1201+ }
1202+
11911203 class FooConverter ( string name ) : ISocketDataPropertyConverter
11921204 {
11931205 public object ? Convert ( ReadOnlyMemory < byte > data )
You can’t perform that action at this time.
0 commit comments