コード例 #1
0
 public void GivenBytes_Parse_ReturnsEncoding()
 {
     Assert.NotNull(MessageEncoding.Parse("EUC-JP".ToByteValueAndSOH()));
     Assert.NotNull(MessageEncoding.Parse("ISO-2022-JP".ToByteValueAndSOH()));
     Assert.NotNull(MessageEncoding.Parse("UTF-8".ToByteValueAndSOH()));
 }
コード例 #2
0
 public void GivenInvalidBytes_Parse_ThrowsNotSupportedException()
 {
     Assert.Throws <NotSupportedException>(() => MessageEncoding.Parse((new byte[3]).AsSpan()));
 }