public void CreateFallbackBuffer_MultipleFallback_ThrowsArgumentException(string replacement)
        {
            DecoderFallbackBuffer buffer = new DecoderReplacementFallback(replacement).CreateFallbackBuffer();

            buffer.Fallback(new byte[] { 1 }, 0);

            Assert.Throws <ArgumentException>("bytesUnknown", () => buffer.Fallback(new byte[] { 1 }, 0));
        }
        public void CreateFallbackBuffer_MultipleFallback_ThrowsArgumentException(string replacement)
        {
            DecoderFallbackBuffer buffer = new DecoderReplacementFallback(replacement).CreateFallbackBuffer();
            buffer.Fallback(new byte[] { 1 }, 0);

            Assert.Throws<ArgumentException>("bytesUnknown", () => buffer.Fallback(new byte[] { 1 }, 0));
        }
        public void CreateFallbackBuffer_Fallback_Char(string replacement, byte[] bytesUnknown, bool expected)
        {
            DecoderFallbackBuffer buffer = new DecoderReplacementFallback(replacement).CreateFallbackBuffer();

            Assert.Equal(expected, buffer.Fallback(bytesUnknown, 0));
        }
 public void CreateFallbackBuffer_Fallback_Char(string replacement, byte[] bytesUnknown, bool expected)
 {
     DecoderFallbackBuffer buffer = new DecoderReplacementFallback(replacement).CreateFallbackBuffer();
     Assert.Equal(expected, buffer.Fallback(bytesUnknown, 0));
 }