InsertAt() public méthode

Attempts to insert the specified character at the specified position in the test string. (Insert character in the virtual string). Returns true on success, false otherwise.
public InsertAt ( char input, int position ) : bool
input char
position int
Résultat bool
        private bool PlaceCharCore( MaskedTextProvider provider, char ch, int startPosition, int length, bool overwrite, out int caretPosition )
        {
            caretPosition = startPosition;

              if( startPosition < m_maskedTextProvider.Length )
              {
            MaskedTextResultHint notUsed;

            if( length > 0 )
            {
              int endPosition = ( startPosition + length ) - 1;
              return provider.Replace( ch, startPosition, endPosition, out caretPosition, out notUsed );
            }

            if( overwrite )
              return provider.Replace( ch, startPosition, out caretPosition, out notUsed );

            return provider.InsertAt( ch, startPosition, out caretPosition, out notUsed );
              }

              return false;
        }
        /// <devdoc>
        ///     Override version to be able to perform the operation on a cloned provider.
        /// </devdoc>
        private bool PlaceChar(MaskedTextProvider provider, char ch, int startPosition, int length, bool overwrite, 
            out MaskedTextResultHint hint)
        {
            Debug.Assert( !this.flagState[IS_NULL_MASK], "This method must be called when a Mask is provided." );

            this.caretTestPos = startPosition;

            if (startPosition < this.maskedTextProvider.Length)
            {
                if (length > 0)  // Replacing selection with input char.
                {
                    int endPos = startPosition + length - 1;
                    return provider.Replace(ch, startPosition, endPos, out this.caretTestPos, out hint);
                }
                else
                {
                    if (overwrite)
                    {
                        // overwrite character at next edit position from startPosition (inclusive).
                        return provider.Replace(ch, startPosition, out this.caretTestPos, out hint);
                    }
                    else // insert.
                    {
                        return provider.InsertAt(ch, startPosition, out this.caretTestPos, out hint);
                    }
                }
            }

            hint = MaskedTextResultHint.UnavailableEditPosition;
            return false;
        }
		public void Add_string_int_MaskedTextResultHint_Test00012 ()
		{
			MaskedTextProvider mtp;
			int testPosition;
			MaskedTextResultHint resultHint;
			bool result;
			//int Int32_out = 0;
			//MaskedTextResultHint MaskedTextResultHint_out = MaskedTextResultHint.Unknown;
			mtp = new MaskedTextProvider (@"abc");
			mtp.Add (@"a");
			mtp.Remove ();
			mtp.InsertAt ('\x61', 1);
			result = mtp.Add (@"abc", out testPosition, out resultHint);
			Assert.AreEqual (true, result, "Add_string_int_MaskedTextResultHint_Test#0");
			Assert.AreEqual (MaskedTextResultHint.Success, resultHint, "Add_string_int_MaskedTextResultHint_Test#1");
			Assert.AreEqual (2, testPosition, "Add_string_int_MaskedTextResultHint_Test#2");
			MaskedTextProviderTest.AssertProperties (mtp, "Add_string_int_MaskedTextResultHint_Test", 3, true, false, 1, 0, CultureInfo.GetCultureInfo ("es-ES"), 1, true, false, false, 0, 3, @"abc", true, true, '\x0', '\x5F', true, true, true, @"abc", @"abc", @"abc", @"abc", @"a", @"abc", @"a");

		}
		public void ToString_bool_bool_int_int_Test00008 ()
		{
			MaskedTextProvider mtp;
			//int Int32_out = 0;
			//MaskedTextResultHint MaskedTextResultHint_out = MaskedTextResultHint.Unknown;
			mtp = new MaskedTextProvider (@"abc");
			mtp.Add (@"a");
			mtp.Remove ();
			mtp.InsertAt ('\x61', 1);
			Assert.AreEqual (@"_", mtp.ToString (true, true, -1, 1), "#0");
			MaskedTextProviderTest.AssertProperties (mtp, "ToString_bool_bool_int_int_Test", 1, true, false, 0, 1, CultureInfo.GetCultureInfo ("es-ES"), 1, true, false, false, -1, 3, @"abc", true, false, '\x0', '\x5F', true, true, true, @" bc", @" bc", @" bc", @"_bc", @"_", @" bc", @"");
		}
		public void ToString_PasswordTest ()
		{
			MaskedTextProvider mtp;

			mtp = new MaskedTextProvider ("####");
			mtp.PasswordChar = '*';
			Assert.AreEqual ("____", mtp.ToString (true, true, true, 0, mtp.Length), "#A1");
			Assert.AreEqual ("____", mtp.ToString (false, true, true, 0, mtp.Length), "#A2");

			mtp.Add ("314");
			Assert.AreEqual ("314_", mtp.ToString (true, true, true, 0, mtp.Length), "#B1");
			Assert.AreEqual ("***_", mtp.ToString (false, true, true, 0, mtp.Length), "#B2");

			mtp.Clear ();

			mtp.InsertAt ("666", 1);
			Assert.AreEqual ("_666", mtp.ToString (true, true, true, 0, mtp.Length), "#C1");
			Assert.AreEqual ("_***", mtp.ToString (false, true, true, 0, mtp.Length), "#C2");
		}
		public void ToString_False_FalseTest ()
		{
			MaskedTextProvider mtp;

			mtp = new MaskedTextProvider ("a?a");
			Assert.AreEqual ("", mtp.ToString (false, false), "#01");
			mtp.InsertAt ('a', 1);
			Assert.AreEqual (" a", mtp.ToString (false, false), "#02");

			mtp = new MaskedTextProvider ("a?a");
			Assert.AreEqual ("", mtp.ToString (false, false), "#03");
			mtp.InsertAt ('a', 0);
			Assert.AreEqual ("a", mtp.ToString (false, false), "#04");

			mtp = new MaskedTextProvider ("a?a?a");
			Assert.AreEqual ("", mtp.ToString (false, false), "#05");
			mtp.InsertAt ('a', 3);
			Assert.AreEqual ("   a", mtp.ToString (false, false), "#06");

			mtp = new MaskedTextProvider ("????a");
			Assert.AreEqual ("", mtp.ToString (false, false), "#07");
			mtp.InsertAt ('a', 3);
			Assert.AreEqual ("   a", mtp.ToString (false, false), "#08");

			mtp = new MaskedTextProvider ("LLLLa");
			Assert.AreEqual ("", mtp.ToString (false, false), "#09");
			mtp.InsertAt ('a', 3);
			Assert.AreEqual ("   a", mtp.ToString (false, false), "#10");

			mtp = new MaskedTextProvider ("CCCCa");
			Assert.AreEqual ("", mtp.ToString (false, false), "#11");
			mtp.InsertAt ('a', 3);
			Assert.AreEqual ("   a", mtp.ToString (false, false), "#12");

			mtp = new MaskedTextProvider ("aaaaa");
			Assert.AreEqual ("", mtp.ToString (false, false), "#13");
			mtp.InsertAt ('a', 3);
			Assert.AreEqual ("   a", mtp.ToString (false, false), "#14");

			mtp = new MaskedTextProvider ("aaaaaaaaaaaaaaaaaaaaaa");
			Assert.AreEqual ("", mtp.ToString (false, false), "#15");
			mtp.InsertAt ('a', 3);
			Assert.AreEqual ("   a", mtp.ToString (false, false), "#16");
			mtp.InsertAt ('a', 9);
			Assert.AreEqual ("   a     a", mtp.ToString (false, false), "#17");

			mtp = new MaskedTextProvider ("aaa");
			mtp.PasswordChar = '*';
			mtp.InsertAt ('a', 2);
			Assert.AreEqual ("  a", mtp.ToString (false, false), "#18");
		}
		public void FindAssignedEditPositionInRangeTest12 ()
		{
			MaskedTextProvider mtp;
			//int Int32_out = 0;
			//MaskedTextResultHint MaskedTextResultHint_out = MaskedTextResultHint.Unknown;
			mtp = new MaskedTextProvider (@"000-00-0000");
			mtp.Add (@"1");
			mtp.Add (@"2");
			mtp.InsertAt ('\x33', 7);
			mtp.InsertAt ('\x34', 4);
			MaskedTextProviderTest.AssertProperties (mtp, "FindAssignedEditPositionInRangeTest", 4115, true, false, 4, 5, CultureInfo.GetCultureInfo ("es-ES"), 9, true, false, false, 7, 11, @"000-00-0000", false, false, '\x0', '\x5F', true, true, true, @"12 -4 -3", @"12 -4 -3", @"12 -4 -3", @"12_-4_-3___", @"12_4_3___", @"12 -4 -3", @"12 4 3");
			Assert.AreEqual (0, mtp.FindAssignedEditPositionInRange (0, 0, false), "#3777");
			Assert.AreEqual (0, mtp.FindAssignedEditPositionInRange (0, 0, true), "#3778");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (0, 1, false), "#3779");
			Assert.AreEqual (0, mtp.FindAssignedEditPositionInRange (0, 1, true), "#3780");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (0, 2, false), "#3781");
			Assert.AreEqual (0, mtp.FindAssignedEditPositionInRange (0, 2, true), "#3782");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (0, 3, false), "#3783");
			Assert.AreEqual (0, mtp.FindAssignedEditPositionInRange (0, 3, true), "#3784");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (0, 4, false), "#3785");
			Assert.AreEqual (0, mtp.FindAssignedEditPositionInRange (0, 4, true), "#3786");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (0, 5, false), "#3787");
			Assert.AreEqual (0, mtp.FindAssignedEditPositionInRange (0, 5, true), "#3788");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (0, 6, false), "#3789");
			Assert.AreEqual (0, mtp.FindAssignedEditPositionInRange (0, 6, true), "#3790");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (0, 7, false), "#3791");
			Assert.AreEqual (0, mtp.FindAssignedEditPositionInRange (0, 7, true), "#3792");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (0, 8, false), "#3793");
			Assert.AreEqual (0, mtp.FindAssignedEditPositionInRange (0, 8, true), "#3794");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (0, 9, false), "#3795");
			Assert.AreEqual (0, mtp.FindAssignedEditPositionInRange (0, 9, true), "#3796");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (0, 10, false), "#3797");
			Assert.AreEqual (0, mtp.FindAssignedEditPositionInRange (0, 10, true), "#3798");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (0, 11, false), "#3799");
			Assert.AreEqual (0, mtp.FindAssignedEditPositionInRange (0, 11, true), "#3800");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (0, 12, false), "#3801");
			Assert.AreEqual (0, mtp.FindAssignedEditPositionInRange (0, 12, true), "#3802");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (1, 0, false), "#3803");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (1, 0, true), "#3804");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 1, false), "#3805");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 1, true), "#3806");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 2, false), "#3807");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 2, true), "#3808");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 3, false), "#3809");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 3, true), "#3810");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (1, 4, false), "#3811");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 4, true), "#3812");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (1, 5, false), "#3813");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 5, true), "#3814");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (1, 6, false), "#3815");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 6, true), "#3816");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (1, 7, false), "#3817");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 7, true), "#3818");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (1, 8, false), "#3819");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 8, true), "#3820");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (1, 9, false), "#3821");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 9, true), "#3822");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (1, 10, false), "#3823");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 10, true), "#3824");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (1, 11, false), "#3825");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 11, true), "#3826");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (1, 12, false), "#3827");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 12, true), "#3828");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 0, false), "#3829");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 0, true), "#3830");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 1, false), "#3831");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 1, true), "#3832");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 2, false), "#3833");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 2, true), "#3834");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 3, false), "#3835");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 3, true), "#3836");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (2, 4, false), "#3837");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (2, 4, true), "#3838");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (2, 5, false), "#3839");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (2, 5, true), "#3840");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (2, 6, false), "#3841");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (2, 6, true), "#3842");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (2, 7, false), "#3843");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (2, 7, true), "#3844");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (2, 8, false), "#3845");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (2, 8, true), "#3846");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (2, 9, false), "#3847");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (2, 9, true), "#3848");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (2, 10, false), "#3849");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (2, 10, true), "#3850");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (2, 11, false), "#3851");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (2, 11, true), "#3852");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (2, 12, false), "#3853");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (2, 12, true), "#3854");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 0, false), "#3855");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 0, true), "#3856");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 1, false), "#3857");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 1, true), "#3858");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 2, false), "#3859");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 2, true), "#3860");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 3, false), "#3861");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 3, true), "#3862");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (3, 4, false), "#3863");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (3, 4, true), "#3864");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (3, 5, false), "#3865");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (3, 5, true), "#3866");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (3, 6, false), "#3867");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (3, 6, true), "#3868");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (3, 7, false), "#3869");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (3, 7, true), "#3870");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (3, 8, false), "#3871");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (3, 8, true), "#3872");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (3, 9, false), "#3873");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (3, 9, true), "#3874");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (3, 10, false), "#3875");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (3, 10, true), "#3876");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (3, 11, false), "#3877");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (3, 11, true), "#3878");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (3, 12, false), "#3879");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (3, 12, true), "#3880");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 0, false), "#3881");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 0, true), "#3882");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 1, false), "#3883");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 1, true), "#3884");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 2, false), "#3885");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 2, true), "#3886");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 3, false), "#3887");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 3, true), "#3888");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (4, 4, false), "#3889");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (4, 4, true), "#3890");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (4, 5, false), "#3891");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (4, 5, true), "#3892");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (4, 6, false), "#3893");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (4, 6, true), "#3894");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (4, 7, false), "#3895");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (4, 7, true), "#3896");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (4, 8, false), "#3897");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (4, 8, true), "#3898");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (4, 9, false), "#3899");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (4, 9, true), "#3900");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (4, 10, false), "#3901");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (4, 10, true), "#3902");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (4, 11, false), "#3903");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (4, 11, true), "#3904");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (4, 12, false), "#3905");
			Assert.AreEqual (4, mtp.FindAssignedEditPositionInRange (4, 12, true), "#3906");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 0, false), "#3907");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 0, true), "#3908");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 1, false), "#3909");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 1, true), "#3910");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 2, false), "#3911");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 2, true), "#3912");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 3, false), "#3913");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 3, true), "#3914");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 4, false), "#3915");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 4, true), "#3916");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 5, false), "#3917");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 5, true), "#3918");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 6, false), "#3919");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 6, true), "#3920");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (5, 7, false), "#3921");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (5, 7, true), "#3922");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (5, 8, false), "#3923");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (5, 8, true), "#3924");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (5, 9, false), "#3925");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (5, 9, true), "#3926");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (5, 10, false), "#3927");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (5, 10, true), "#3928");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (5, 11, false), "#3929");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (5, 11, true), "#3930");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (5, 12, false), "#3931");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (5, 12, true), "#3932");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 0, false), "#3933");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 0, true), "#3934");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 1, false), "#3935");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 1, true), "#3936");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 2, false), "#3937");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 2, true), "#3938");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 3, false), "#3939");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 3, true), "#3940");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 4, false), "#3941");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 4, true), "#3942");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 5, false), "#3943");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 5, true), "#3944");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 6, false), "#3945");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 6, true), "#3946");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (6, 7, false), "#3947");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (6, 7, true), "#3948");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (6, 8, false), "#3949");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (6, 8, true), "#3950");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (6, 9, false), "#3951");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (6, 9, true), "#3952");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (6, 10, false), "#3953");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (6, 10, true), "#3954");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (6, 11, false), "#3955");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (6, 11, true), "#3956");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (6, 12, false), "#3957");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (6, 12, true), "#3958");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (7, 0, false), "#3959");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (7, 0, true), "#3960");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (7, 1, false), "#3961");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (7, 1, true), "#3962");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (7, 2, false), "#3963");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (7, 2, true), "#3964");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (7, 3, false), "#3965");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (7, 3, true), "#3966");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (7, 4, false), "#3967");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (7, 4, true), "#3968");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (7, 5, false), "#3969");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (7, 5, true), "#3970");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (7, 6, false), "#3971");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (7, 6, true), "#3972");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (7, 7, false), "#3973");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (7, 7, true), "#3974");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (7, 8, false), "#3975");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (7, 8, true), "#3976");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (7, 9, false), "#3977");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (7, 9, true), "#3978");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (7, 10, false), "#3979");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (7, 10, true), "#3980");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (7, 11, false), "#3981");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (7, 11, true), "#3982");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (7, 12, false), "#3983");
			Assert.AreEqual (7, mtp.FindAssignedEditPositionInRange (7, 12, true), "#3984");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (8, 0, false), "#3985");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (8, 0, true), "#3986");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (8, 1, false), "#3987");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (8, 1, true), "#3988");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (8, 2, false), "#3989");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (8, 2, true), "#3990");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (8, 3, false), "#3991");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (8, 3, true), "#3992");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (8, 4, false), "#3993");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (8, 4, true), "#3994");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (8, 5, false), "#3995");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (8, 5, true), "#3996");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (8, 6, false), "#3997");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (8, 6, true), "#3998");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (8, 7, false), "#3999");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (8, 7, true), "#4000");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (8, 8, false), "#4001");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (8, 8, true), "#4002");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (8, 9, false), "#4003");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (8, 9, true), "#4004");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (8, 10, false), "#4005");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (8, 10, true), "#4006");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (8, 11, false), "#4007");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (8, 11, true), "#4008");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (8, 12, false), "#4009");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (8, 12, true), "#4010");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (9, 0, false), "#4011");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (9, 0, true), "#4012");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (9, 1, false), "#4013");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (9, 1, true), "#4014");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (9, 2, false), "#4015");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (9, 2, true), "#4016");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (9, 3, false), "#4017");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (9, 3, true), "#4018");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (9, 4, false), "#4019");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (9, 4, true), "#4020");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (9, 5, false), "#4021");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (9, 5, true), "#4022");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (9, 6, false), "#4023");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (9, 6, true), "#4024");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (9, 7, false), "#4025");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (9, 7, true), "#4026");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (9, 8, false), "#4027");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (9, 8, true), "#4028");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (9, 9, false), "#4029");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (9, 9, true), "#4030");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (9, 10, false), "#4031");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (9, 10, true), "#4032");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (9, 11, false), "#4033");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (9, 11, true), "#4034");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (9, 12, false), "#4035");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (9, 12, true), "#4036");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (10, 0, false), "#4037");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (10, 0, true), "#4038");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (10, 1, false), "#4039");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (10, 1, true), "#4040");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (10, 2, false), "#4041");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (10, 2, true), "#4042");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (10, 3, false), "#4043");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (10, 3, true), "#4044");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (10, 4, false), "#4045");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (10, 4, true), "#4046");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (10, 5, false), "#4047");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (10, 5, true), "#4048");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (10, 6, false), "#4049");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (10, 6, true), "#4050");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (10, 7, false), "#4051");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (10, 7, true), "#4052");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (10, 8, false), "#4053");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (10, 8, true), "#4054");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (10, 9, false), "#4055");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (10, 9, true), "#4056");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (10, 10, false), "#4057");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (10, 10, true), "#4058");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (10, 11, false), "#4059");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (10, 11, true), "#4060");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (10, 12, false), "#4061");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (10, 12, true), "#4062");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (11, 0, false), "#4063");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (11, 0, true), "#4064");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (11, 1, false), "#4065");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (11, 1, true), "#4066");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (11, 2, false), "#4067");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (11, 2, true), "#4068");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (11, 3, false), "#4069");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (11, 3, true), "#4070");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (11, 4, false), "#4071");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (11, 4, true), "#4072");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (11, 5, false), "#4073");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (11, 5, true), "#4074");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (11, 6, false), "#4075");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (11, 6, true), "#4076");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (11, 7, false), "#4077");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (11, 7, true), "#4078");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (11, 8, false), "#4079");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (11, 8, true), "#4080");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (11, 9, false), "#4081");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (11, 9, true), "#4082");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (11, 10, false), "#4083");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (11, 10, true), "#4084");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (11, 11, false), "#4085");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (11, 11, true), "#4086");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (11, 12, false), "#4087");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (11, 12, true), "#4088");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (12, 0, false), "#4089");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (12, 0, true), "#4090");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (12, 1, false), "#4091");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (12, 1, true), "#4092");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (12, 2, false), "#4093");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (12, 2, true), "#4094");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (12, 3, false), "#4095");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (12, 3, true), "#4096");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (12, 4, false), "#4097");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (12, 4, true), "#4098");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (12, 5, false), "#4099");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (12, 5, true), "#4100");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (12, 6, false), "#4101");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (12, 6, true), "#4102");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (12, 7, false), "#4103");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (12, 7, true), "#4104");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (12, 8, false), "#4105");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (12, 8, true), "#4106");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (12, 9, false), "#4107");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (12, 9, true), "#4108");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (12, 10, false), "#4109");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (12, 10, true), "#4110");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (12, 11, false), "#4111");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (12, 11, true), "#4112");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (12, 12, false), "#4113");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (12, 12, true), "#4114");
		}
		public void RemoveAtTest ()
		{
			MaskedTextProvider mtp;
			int Int32_out = 0;
			MaskedTextResultHint MaskedTextResultHint_out = MaskedTextResultHint.Unknown;
			mtp = new MaskedTextProvider (@"aaaaaaaaaaaa");
			mtp.Add ("123456789");
			mtp.RemoveAt (3, 6, out Int32_out, out MaskedTextResultHint_out);
			Assert.AreEqual (3, Int32_out, "#A1");
			Assert.AreEqual (MaskedTextResultHint.Success, MaskedTextResultHint_out, "#A2");
			MaskedTextProviderTest.AssertProperties (mtp, "RemoveAtTest_A", 1, true, false, 5, 7, CultureInfo.GetCultureInfo ("es-ES"), 12, true, false, false, 4, 12, @"aaaaaaaaaaaa", true, false, '\x0', '\x5F', true, true, true, @"12389", @"12389", @"12389", @"12389_______", @"12389_______", @"12389", @"12389");

			mtp = new MaskedTextProvider (@"La");
			mtp.Add ("z1");
			mtp.RemoveAt (0, 1, out Int32_out, out MaskedTextResultHint_out);
			Assert.AreEqual (0, Int32_out, "#B1");
			Assert.AreEqual (MaskedTextResultHint.Success, MaskedTextResultHint_out, "#B2");
			MaskedTextProviderTest.AssertProperties (mtp, "RemoveAtTest_B", 1, true, false, 0, 2, CultureInfo.GetCultureInfo ("es-ES"), 2, true, false, false, -1, 2, @"La", false, false, '\x0', '\x5F', true, true, true, @"", @"", @"", @"__", @"__", @"", @"");

			mtp = new MaskedTextProvider (@"La");
			mtp.Add ("z1");
			mtp.RemoveAt (0, 1, out Int32_out, out MaskedTextResultHint_out);
			Assert.AreEqual (0, Int32_out, "#B1");
			Assert.AreEqual (MaskedTextResultHint.Success, MaskedTextResultHint_out, "#B2");
			MaskedTextProviderTest.AssertProperties (mtp, "RemoveAtTest_B", 1, true, false, 0, 2, CultureInfo.GetCultureInfo ("es-ES"), 2, true, false, false, -1, 2, @"La", false, false, '\x0', '\x5F', true, true, true, @"", @"", @"", @"__", @"__", @"", @"");

			// Remove non-assigned character with assigned characters later on.
			mtp = new MaskedTextProvider (@"aaaaaaaaaaaa");
			mtp.InsertAt ("1", 1);
			mtp.RemoveAt (0, 0, out Int32_out, out MaskedTextResultHint_out);
			Assert.AreEqual (0, Int32_out, "#C1");
			Assert.AreEqual (MaskedTextResultHint.SideEffect, MaskedTextResultHint_out, "#C2");
			MaskedTextProviderTest.AssertProperties (mtp, "RemoveAtTest_C", 1, true, false, 1, 11, CultureInfo.GetCultureInfo ("es-ES"), 12, true, false, false, 0, 12, @"aaaaaaaaaaaa", true, false, '\x0', '\x5F', true, true, true, @"1", @"1", @"1", @"1___________", @"1___________", @"1", @"1");

			// Remove assigned+non-assigned character with assigned characters later on.
			mtp = new MaskedTextProvider (@"aaaaaaaaaaaa");
			mtp.InsertAt ("1", 1);
			mtp.InsertAt ("4", 4);
			mtp.RemoveAt (1, 2, out Int32_out, out MaskedTextResultHint_out);
			Assert.AreEqual (1, Int32_out, "#D1");
			Assert.AreEqual (MaskedTextResultHint.Success, MaskedTextResultHint_out, "#D2");
			MaskedTextProviderTest.AssertProperties (mtp, "RemoveAtTest_D", 1, true, false, 1, 11, CultureInfo.GetCultureInfo ("es-ES"), 12, true, false, false, 2, 12, @"aaaaaaaaaaaa", true, false, '\x0', '\x5F', true, true, true, @"  4", @"  4", @"  4", @"__4_________", @"__4_________", @"  4", @"  4");

			// Remove non-assigned+assigned character with assigned characters later on.
			mtp = new MaskedTextProvider (@"aaaaaaaaaaaa");
			mtp.InsertAt ("1", 1);
			mtp.InsertAt ("4", 4);
			mtp.RemoveAt (0, 1, out Int32_out, out MaskedTextResultHint_out);
			Assert.AreEqual (0, Int32_out, "#E1");
			Assert.AreEqual (MaskedTextResultHint.Success, MaskedTextResultHint_out, "#E2");
			MaskedTextProviderTest.AssertProperties (mtp, "RemoveAtTest_E", 1, true, false, 1, 11, CultureInfo.GetCultureInfo ("es-ES"), 12, true, false, false, 2, 12, @"aaaaaaaaaaaa", true, false, '\x0', '\x5F', true, true, true, @"  4", @"  4", @"  4", @"__4_________", @"__4_________", @"  4", @"  4");

			// Remove 2 characters with a assigned character just after that cannot be removed 1 character.
			mtp = new MaskedTextProvider (@"aaaLaaaaaaaa");
			mtp.Add ("012Z4");
			mtp.RemoveAt (0, 1, out Int32_out, out MaskedTextResultHint_out);
			Assert.AreEqual (0, Int32_out, "#F1");
			Assert.AreEqual (MaskedTextResultHint.Success, MaskedTextResultHint_out, "#F2");
			MaskedTextProviderTest.AssertProperties (mtp, "RemoveAtTest_F", 1, true, false, 3, 9, CultureInfo.GetCultureInfo ("es-ES"), 12, true, false, false, 2, 12, @"aaaLaaaaaaaa", false, false, '\x0', '\x5F', true, true, true, @"2Z4", @"2Z4", @"2Z4", @"2Z4_________", @"2Z4_________", @"2Z4", @"2Z4");

		}
		public void FindAssignedEditPositionInRangeTest4 ()
		{
			MaskedTextProvider mtp;
			//int Int32_out = 0;
			//MaskedTextResultHint MaskedTextResultHint_out = MaskedTextResultHint.Unknown;
			mtp = new MaskedTextProvider (@"a?b?c");
			mtp.Add ("a");
			mtp.Remove ();
			mtp.InsertAt ('\x61', 1);
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (0, 0, false), "#201");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (0, 0, true), "#202");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (0, 1, false), "#203");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (0, 1, true), "#204");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (0, 2, false), "#205");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (0, 2, true), "#206");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (0, 3, false), "#207");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (0, 3, true), "#208");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (0, 4, false), "#209");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (0, 4, true), "#210");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (0, 5, false), "#211");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (0, 5, true), "#212");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (0, 6, false), "#213");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (0, 6, true), "#214");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (1, 0, false), "#215");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (1, 0, true), "#216");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 1, false), "#217");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 1, true), "#218");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 2, false), "#219");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 2, true), "#220");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 3, false), "#221");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 3, true), "#222");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 4, false), "#223");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 4, true), "#224");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 5, false), "#225");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 5, true), "#226");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 6, false), "#227");
			Assert.AreEqual (1, mtp.FindAssignedEditPositionInRange (1, 6, true), "#228");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 0, false), "#229");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 0, true), "#230");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 1, false), "#231");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 1, true), "#232");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 2, false), "#233");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 2, true), "#234");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 3, false), "#235");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 3, true), "#236");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 4, false), "#237");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 4, true), "#238");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 5, false), "#239");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 5, true), "#240");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 6, false), "#241");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 6, true), "#242");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 0, false), "#243");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 0, true), "#244");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 1, false), "#245");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 1, true), "#246");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 2, false), "#247");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 2, true), "#248");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 3, false), "#249");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 3, true), "#250");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 4, false), "#251");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 4, true), "#252");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 5, false), "#253");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 5, true), "#254");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 6, false), "#255");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 6, true), "#256");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 0, false), "#257");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 0, true), "#258");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 1, false), "#259");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 1, true), "#260");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 2, false), "#261");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 2, true), "#262");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 3, false), "#263");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 3, true), "#264");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 4, false), "#265");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 4, true), "#266");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 5, false), "#267");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 5, true), "#268");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 6, false), "#269");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 6, true), "#270");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 0, false), "#271");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 0, true), "#272");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 1, false), "#273");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 1, true), "#274");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 2, false), "#275");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 2, true), "#276");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 3, false), "#277");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 3, true), "#278");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 4, false), "#279");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 4, true), "#280");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 5, false), "#281");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 5, true), "#282");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 6, false), "#283");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (5, 6, true), "#284");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 0, false), "#285");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 0, true), "#286");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 1, false), "#287");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 1, true), "#288");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 2, false), "#289");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 2, true), "#290");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 3, false), "#291");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 3, true), "#292");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 4, false), "#293");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 4, true), "#294");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 5, false), "#295");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 5, true), "#296");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 6, false), "#297");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (6, 6, true), "#298");
			AssertProperties (mtp, "FindAssignedEditPositionInRangeTest", 299, true, false, 1, 2, CultureInfo.GetCultureInfo ("en-US"), 3, true, false, false, 1, 5, "a?b?c", true, false, '\x0', '\x5F', true, true, true, @" ab c", @" ab c", @" ab c", @"_ab_c", @"_a_", @" ab c", @" a");
		}
		public void FindAssignedEditPositionInRangeTest2 ()
		{
			MaskedTextProvider mtp;
			//int Int32_out = 0;
			//MaskedTextResultHint MaskedTextResultHint_out = MaskedTextResultHint.Unknown;
			mtp = new MaskedTextProvider (@"abc");
			mtp.Add ("a");
			mtp.Remove ();
			mtp.InsertAt ('\x61', 1);
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (0, 0, false), "#51");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (0, 0, true), "#52");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (0, 1, false), "#53");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (0, 1, true), "#54");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (0, 2, false), "#55");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (0, 2, true), "#56");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (0, 3, false), "#57");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (0, 3, true), "#58");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (0, 4, false), "#59");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (0, 4, true), "#60");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (1, 0, false), "#61");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (1, 0, true), "#62");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (1, 1, false), "#63");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (1, 1, true), "#64");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (1, 2, false), "#65");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (1, 2, true), "#66");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (1, 3, false), "#67");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (1, 3, true), "#68");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (1, 4, false), "#69");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (1, 4, true), "#70");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 0, false), "#71");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 0, true), "#72");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 1, false), "#73");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 1, true), "#74");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 2, false), "#75");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 2, true), "#76");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 3, false), "#77");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 3, true), "#78");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 4, false), "#79");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (2, 4, true), "#80");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 0, false), "#81");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 0, true), "#82");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 1, false), "#83");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 1, true), "#84");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 2, false), "#85");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 2, true), "#86");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 3, false), "#87");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 3, true), "#88");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 4, false), "#89");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (3, 4, true), "#90");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 0, false), "#91");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 0, true), "#92");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 1, false), "#93");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 1, true), "#94");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 2, false), "#95");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 2, true), "#96");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 3, false), "#97");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 3, true), "#98");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 4, false), "#99");
			Assert.AreEqual (-1, mtp.FindAssignedEditPositionInRange (4, 4, true), "#100");
			AssertProperties (mtp, "FindAssignedEditPositionInRangeTest", 101, true, false, 0, 1, CultureInfo.GetCultureInfo ("en-US"), 1, true, false, false, -1, 3, "abc", true, false, '\x0', '\x5F', true, true, true, @" bc", @" bc", @" bc", @"_bc", @"_", @" bc", @"");
		}
		public void InsertAt_charTest ()
		{
			MaskedTextProvider mtp;
			int Int32_out = 0;
			MaskedTextResultHint MaskedTextResultHint_out = MaskedTextResultHint.Unknown;

			// insert space over space
			mtp = new MaskedTextProvider ("aaa");
			mtp.Add (" ");
			Assert.AreEqual (true, mtp.InsertAt (' ', 0, out Int32_out, out MaskedTextResultHint_out), "#A1");
			Assert.AreEqual ("", mtp.ToString (), "A2");
			Assert.AreEqual (0, Int32_out, "A3");
			Assert.AreEqual (MaskedTextResultHint.CharacterEscaped, MaskedTextResultHint_out, "A4");
			MaskedTextProviderTest.AssertProperties (mtp, "InsertAt_charTest_A", 1, true, false, 0, 3, CultureInfo.GetCultureInfo ("es-ES"), 3, true, false, false, -1, 3, @"aaa", true, false, '\x0', '\x5F', true, true, true, @"", @"", @"", @"___", @"___", @"", @"");

			// insert space over normal char.
			mtp = new MaskedTextProvider ("aaa");
			mtp.Add ("a");
			Assert.AreEqual (true, mtp.InsertAt (' ', 0, out Int32_out, out MaskedTextResultHint_out), "#B1");
			Assert.AreEqual (" a", mtp.ToString (), "B2");
			Assert.AreEqual (0, Int32_out, "B3");
			Assert.AreEqual (MaskedTextResultHint.Success, MaskedTextResultHint_out, "B4");
			MaskedTextProviderTest.AssertProperties (mtp, "InsertAt_charTest_B", 1, true, false, 1, 2, CultureInfo.GetCultureInfo ("es-ES"), 3, true, false, false, 1, 3, @"aaa", true, false, '\x0', '\x5F', true, true, true, @" a", @" a", @" a", @"_a_", @"_a_", @" a", @" a");

			// insert space over empty position.
			mtp = new MaskedTextProvider ("aaa");
			Assert.AreEqual (true, mtp.InsertAt (' ', 0, out Int32_out, out MaskedTextResultHint_out), "#C1");
			Assert.AreEqual ("", mtp.ToString (), "C2");
			Assert.AreEqual (0, Int32_out, "C3");
			Assert.AreEqual (MaskedTextResultHint.CharacterEscaped, MaskedTextResultHint_out, "C4");
			MaskedTextProviderTest.AssertProperties (mtp, "InsertAt_charTest_C", 1, true, false, 0, 3, CultureInfo.GetCultureInfo ("es-ES"), 3, true, false, false, -1, 3, @"aaa", true, false, '\x0', '\x5F', true, true, true, @"", @"", @"", @"___", @"___", @"", @"");

			// insert space over empty position with other characters later in the string already inserted..
			mtp = new MaskedTextProvider ("aaa");
			mtp.InsertAt ('z', 2);
			Assert.AreEqual (true, mtp.InsertAt (' ', 0, out Int32_out, out MaskedTextResultHint_out), "#D1");
			Assert.AreEqual ("  z", mtp.ToString (), "D2");
			Assert.AreEqual (0, Int32_out, "D3");
			Assert.AreEqual (MaskedTextResultHint.CharacterEscaped, MaskedTextResultHint_out, "D4");
			MaskedTextProviderTest.AssertProperties (mtp, "InsertAt_charTest_D", 1, true, false, 1, 2, CultureInfo.GetCultureInfo ("es-ES"), 3, true, false, false, 2, 3, @"aaa", true, false, '\x0', '\x5F', true, true, true, @"  z", @"  z", @"  z", @"__z", @"__z", @"  z", @"  z");

			// insert space over non-empty position with other characters later in the string already inserted..
			mtp = new MaskedTextProvider ("aaa");
			mtp.InsertAt ('z', 0);
			mtp.InsertAt ('z', 1);
			Assert.AreEqual (true, mtp.InsertAt (' ', 0, out Int32_out, out MaskedTextResultHint_out), "#E1");
			Assert.AreEqual (" zz", mtp.ToString (), "E2");
			Assert.AreEqual (0, Int32_out, "E3");
			Assert.AreEqual (MaskedTextResultHint.Success, MaskedTextResultHint_out, "E4");
			MaskedTextProviderTest.AssertProperties (mtp, "InsertAt_charTest_E", 1, true, false, 2, 1, CultureInfo.GetCultureInfo ("es-ES"), 3, true, false, false, 2, 3, @"aaa", true, false, '\x0', '\x5F', true, true, true, @" zz", @" zz", @" zz", @"_zz", @"_zz", @" zz", @" zz");

			// Insert number over empty position with other characters later in the string.
			mtp = new MaskedTextProvider (@"aaa");
			mtp.InsertAt ('\x33', 2);
			Assert.AreEqual (true, mtp.InsertAt ('\x34', 0, out Int32_out, out MaskedTextResultHint_out), "#F1");
			Assert.AreEqual ("4 3", mtp.ToString (), "F2");
			Assert.AreEqual (0, Int32_out, "F3");
			Assert.AreEqual (MaskedTextResultHint.Success, MaskedTextResultHint_out, "F4");
			MaskedTextProviderTest.AssertProperties (mtp, "InsertAt_charTest_F", 1, true, false, 2, 1, CultureInfo.GetCultureInfo ("es-ES"), 3, true, false, false, 2, 3, @"aaa", true, false, '\x0', '\x5F', true, true, true, @"4 3", @"4 3", @"4 3", @"4_3", @"4_3", @"4 3", @"4 3");

			// insert space over literal with filled in positions later on (no more available edit positions)
			mtp = new MaskedTextProvider ("aba");
			mtp.InsertAt ('z', 0);
			mtp.InsertAt ('z', 1);
			mtp.InsertAt ('z', 2);
			Assert.AreEqual (false, mtp.InsertAt (' ', 1, out Int32_out, out MaskedTextResultHint_out), "#F1");
			Assert.AreEqual ("zbz", mtp.ToString (), "F2");
			Assert.AreEqual (3, Int32_out, "F3");
			Assert.AreEqual (MaskedTextResultHint.UnavailableEditPosition, MaskedTextResultHint_out, "F4");
			MaskedTextProviderTest.AssertProperties (mtp, "InsertAt_charTest_F", 1, true, false, 2, 0, CultureInfo.GetCultureInfo ("es-ES"), 2, true, false, false, 2, 3, @"aba", true, true, '\x0', '\x5F', true, true, true, @"zbz", @"zbz", @"zbz", @"zbz", @"zz", @"zbz", @"zz");

			// insert space over literal with filled in positions later on ( more available edit positions)
			mtp = new MaskedTextProvider ("abaa");
			mtp.InsertAt ('z', 0);
			mtp.InsertAt ('z', 2);
			Assert.AreEqual (true, mtp.InsertAt (' ', 1, out Int32_out, out MaskedTextResultHint_out), "#G1");
			Assert.AreEqual ("zb z", mtp.ToString (), "G2");
			Assert.AreEqual (2, Int32_out, "G3");
			Assert.AreEqual (MaskedTextResultHint.Success, MaskedTextResultHint_out, "G4");
			MaskedTextProviderTest.AssertProperties (mtp, "InsertAt_charTest_G", 1, true, false, 2, 1, CultureInfo.GetCultureInfo ("es-ES"), 3, true, false, false, 3, 4, @"abaa", true, false, '\x0', '\x5F', true, true, true, @"zb z", @"zb z", @"zb z", @"zb_z", @"z_z", @"zb z", @"z z");

			// insert space over literal with only more literals later on
			mtp = new MaskedTextProvider ("abb");
			Assert.AreEqual (false, mtp.InsertAt (' ', 1, out Int32_out, out MaskedTextResultHint_out), "#G1");
			Assert.AreEqual (" bb", mtp.ToString (), "G2");
			Assert.AreEqual (3, Int32_out, "G3");
			Assert.AreEqual (MaskedTextResultHint.UnavailableEditPosition, MaskedTextResultHint_out, "G4");
			MaskedTextProviderTest.AssertProperties (mtp, "InsertAt_charTest_G", 1, true, false, 0, 1, CultureInfo.GetCultureInfo ("es-ES"), 1, true, false, false, -1, 3, @"abb", true, false, '\x0', '\x5F', true, true, true, @" bb", @" bb", @" bb", @"_bb", @"_", @" bb", @"");

		}