public void AllowFilter_NonBMP()
        {
            TextEncoderSettings filter = new TextEncoderSettings();

            filter.AllowCodePoints(Enumerable.Range(0x10000, 20));
            Assert.Empty(filter.GetAllowedCodePoints());
        }
        public void AllowFilter()
        {
            // Arrange
            var filter = new TextEncoderSettings(UnicodeRanges.BasicLatin);

            filter.AllowCodePoints(new OddTextEncoderSettings().GetAllowedCodePoints());

            // Assert
            for (int i = 0; i <= 0x007F; i++)
            {
                Assert.True(filter.IsCharacterAllowed((char)i));
            }
            for (int i = 0x0080; i <= char.MaxValue; i++)
            {
                Assert.Equal((i % 2) == 1, filter.IsCharacterAllowed((char)i));
            }
        }
        public void AllowFilter_NullCodePoints()
        {
            TextEncoderSettings filter = new TextEncoderSettings(UnicodeRanges.BasicLatin);

            Assert.Throws <ArgumentNullException>("codePoints", () => filter.AllowCodePoints(null));
        }