public void CustomDecoderFallback() { byte[] encoded = { 0x80, 0xA1, 0x83 }; encoder = new EucJpEncoding( new DecoderReplacementFallback("?!"), new EncoderExceptionFallback()); Assert.AreEqual("?!?!?!", encoder.GetString(encoded)); }
public void DefaultDecoderFallbackThrowsException() { byte[] encoded = { 0x80, 0xA1, 0x83 }; Assert.Throws <DecoderFallbackException>( () => encoder.GetString(encoded)); }