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

            filter.AllowCodePoints(Enumerable.Range(0x10000, 20));
            Assert.Empty(filter.GetAllowedCodePoints());
        }
        public void GetAllowedCodePoints()
        {
            // Arrange
            var expected = Enumerable.Range(UnicodeRanges.BasicLatin.FirstCodePoint, UnicodeRanges.BasicLatin.Length)
                           .Concat(Enumerable.Range(UnicodeRanges.Specials.FirstCodePoint, UnicodeRanges.Specials.Length))
                           .Except(new int[] { 'x' })
                           .OrderBy(i => i)
                           .ToArray();

            var filter = new TextEncoderSettings(UnicodeRanges.BasicLatin, UnicodeRanges.Specials);

            filter.ForbidCharacter('x');

            // Act
            var retVal = filter.GetAllowedCodePoints().OrderBy(i => i).ToArray();

            // Assert
            Assert.Equal <int>(expected, retVal);
        }
        public void Ctor_Parameterless_CreatesEmptyFilter()
        {
            var filter = new TextEncoderSettings();

            Assert.Equal(0, filter.GetAllowedCodePoints().Count());
        }