static void GenerateIsEditPositionTest ()
		{
			string Name = "mtp";
			string TestName = MethodInfo.GetCurrentMethod ().Name.Replace ("Generate", "");
			int counter = 0;


			WriteTestHeader (TestName, "MaskedTextProvider mtp;", "int Int32_out = 0;", "MaskedTextResultHint MaskedTextResultHint_out = MaskedTextResultHint.Unknown;");
			MS_System_ComponentModel.MaskedTextProvider mtp = null;
			//int Int32_out = 0;
			//MS_System_ComponentModel.MaskedTextResultHint MaskedTextResultHint_out = MS_System_ComponentModel.MaskedTextResultHint.Unknown;

			foreach (string mask in test_masks) {
				for (int i = -1; i < mask.Length + 2; i++) {
					bool more_states = true;
					int stateindex = 0;
					do {
						object [] arguments;
						arguments = new object [] { i };
						if (Compare ("IsEditPosition", mask, ref stateindex, arguments, ref more_states)) {
							continue;
						}

						WriteTestStart ();
						mtp = new MS_System_ComponentModel.MaskedTextProvider (mask);
						WriteLine ("mtp = new MaskedTextProvider (@\"" + mask.Replace ("\"", "\"\"") + "\");");
						more_states = CreateState (mtp, stateindex);
						stateindex++;

						WriteLine ("Assert.AreEqual ({0}, mtp.IsEditPosition ({1}), \"#{2}\");", GetStringValue (mtp.IsEditPosition (i)), i.ToString (), (counter++).ToString ());

						WriteAssertProperties (mtp, Name, TestName, ref counter);
						WriteTestEnd ();

					} while (more_states);
				}
			}

			WriteTestFooter ();
		}
		static void GenerateFindRangeTest (string methodName)
		{
			string Name = "mtp";
			string TestName = methodName + "Test";
			int counter = 0;

			WriteTestHeader (TestName, "MaskedTextProvider mtp;", "int Int32_out = 0;", "MaskedTextResultHint MaskedTextResultHint_out = MaskedTextResultHint.Unknown;");
			MS_System_ComponentModel.MaskedTextProvider mtp = null;

			foreach (string mask in test_masks) {
				foreach (bool value in new bool [] { true, false }) {
					for (int i = 0; i < mask.Length + 2; i++) {
						for (int k = 0; k < mask.Length + 2; k++) {

							int stateindex = 0;
							bool more_states = true;
							do {

								object [] arguments;
								arguments = new object [] { i, k, value };
								if (Compare (methodName, mask, ref stateindex, arguments, ref more_states)) {
									continue;
								}

								WriteTestStart ();
								mtp = new MS_System_ComponentModel.MaskedTextProvider (mask);
								WriteLine ("mtp = new MaskedTextProvider (@\"" + mask.Replace ("\"", "\"\"") + "\");");
								more_states = CreateState (mtp, stateindex);
								stateindex++;

								WriteLine ("Assert.AreEqual ({0}, mtp." + methodName + " ({1}, {2}, {4}), \"#{3}\");", mtp.GetType ().InvokeMember (methodName, BindingFlags.Public | BindingFlags.Instance | BindingFlags.InvokeMethod, null, mtp.GetType (), arguments).ToString (), i.ToString (), k.ToString (), (counter++).ToString (), value ? "true" : "false");

								WriteAssertProperties (mtp, Name, TestName, ref counter);
								WriteTestEnd ();

							} while (more_states);
						}
					}
				}
			}

			WriteTestFooter ();
		}
		static void GenerateInsertAt_string_int_int_MaskedTextResultHintTest ()
		{
			string Name = "mtp";
			string TestName = MethodInfo.GetCurrentMethod ().Name.Replace ("Generate", "");
			int counter = 0;

			WriteTestHeader (TestName, "MaskedTextProvider mtp;", "int Int32_out = 0;", "MaskedTextResultHint MaskedTextResultHint_out = MaskedTextResultHint.Unknown;");
			MS_System_ComponentModel.MaskedTextProvider mtp = null;
			int Int32_out = 0;
			MS_System_ComponentModel.MaskedTextResultHint MaskedTextResultHint_out = MS_System_ComponentModel.MaskedTextResultHint.Unknown;

			foreach (string mask in test_masks) {

				foreach (string str in string_values) {
					if (str == null)
						continue;

					for (int i = 0; i < mask.Length; i++) {
						bool more_states = true;
						int stateindex = 0;
						do {

							object [] arguments;
							arguments = new object [] { str, i, Int32_out, MaskedTextResultHint_out };
							if (Compare ("InsertAt", mask, ref stateindex, arguments, ref more_states)) {
								continue;
							}

							WriteTestStart ();
							mtp = new MS_System_ComponentModel.MaskedTextProvider (mask);
							WriteLine ("mtp = new MaskedTextProvider (@\"" + mask.Replace ("\"", "\"\"") + "\");");
							more_states = CreateState (mtp, stateindex);
							stateindex++;

							WriteLine ("Assert.AreEqual ({0}, mtp.InsertAt ({1}, {2}, out Int32_out, out MaskedTextResultHint_out), \"#{3}\");",
								GetStringValue (mtp.InsertAt (str, i, out Int32_out, out MaskedTextResultHint_out)), GetStringValue (str), i.ToString (), (counter++).ToString ());
							WriteLine ("Assert.AreEqual ({0}, Int32_out, \"#{1}\");", GetStringValue (Int32_out), (counter++).ToString ());
							WriteLine ("Assert.AreEqual ({0}, MaskedTextResultHint_out, \"#{1}\");", GetStringValue (MaskedTextResultHint_out), (counter++).ToString ());

							WriteAssertProperties (mtp, Name, TestName, ref counter);
							WriteTestEnd ();

						} while (more_states);
					}
				}
			}

			WriteTestFooter ();
		}
		static void GenerateEditPositionsTest ()
		{
			int counter = 0;
			MS_System_ComponentModel.MaskedTextProvider mtp = null;
			string TestName = "EditPositionsTestGenerated";

			WriteTestHeader (TestName, "MaskedTextProvider mtp;", "int testPosition;", "MaskedTextResultHint resultHint;", "bool result;", "int Int32_out = 0;", "MaskedTextResultHint MaskedTextResultHint_out = MaskedTextResultHint.Unknown;");
			WriteLine ("");
			foreach (string mask in test_masks) {
				int stateindex = 0;
				bool more_states = true;
				do {
					object [] arguments;
					arguments = new object [] {};
					if (Compare ("EditPositions", mask, ref stateindex, arguments, ref more_states)) {
						continue;
					}
					
					WriteTestStart ();

					string new_statement = "mtp = new MaskedTextProvider (@\"" + mask.Replace ("\"", "\"\"") + "\");";
					more_states = CreateState (mtp, stateindex);
					stateindex++;
					mtp = new MS_System_ComponentModel.MaskedTextProvider (mask);
					string result = MaskedTextProviderTest.join (mtp.EditPositions, ";");
					WriteLine ("");
					WriteLine (new_statement);
					WriteLine ("Assert.AreEqual (\"" + result + "\", MaskedTextProviderTest.join (mtp.EditPositions, \";\"), \"{0}#{1}\");", TestName, (counter++).ToString ());
					WriteTestEnd ();
				} while (more_states);
			}

			WriteTestFooter ();

		}
		static void GenerateClear_MaskedTextResultHint_Test (bool with_result)
		{
			string Name = "mtp";
			string TestName = MethodInfo.GetCurrentMethod ().Name.Replace ("Generate", "");
			int counter = 0;

			if (!with_result) {
				TestName = TestName.Replace ("_MaskedTextResultHint_", "");
			}

			WriteTestHeader (TestName, "MaskedTextProvider mtp;", "int testPosition;", "MaskedTextResultHint resultHint;", "bool result;", "int Int32_out = 0;", "MaskedTextResultHint MaskedTextResultHint_out = MaskedTextResultHint.Unknown;");

			MS_System_ComponentModel.MaskedTextProvider mtp = null;
			MS_System_ComponentModel.MaskedTextResultHint resultHint = MS_System_ComponentModel.MaskedTextResultHint.Unknown;

			foreach (string mask in test_masks) {
				bool more_states = true;
				int stateindex = 0;
				do {

					object [] arguments;
					arguments = new object [] { resultHint };
					if (Compare ("Clear", mask, ref stateindex, arguments, ref more_states)) {
						continue;
					}

					WriteTestStart ();
					mtp = new MS_System_ComponentModel.MaskedTextProvider (mask);
					WriteLine ("mtp = new MaskedTextProvider (@\"" + mask.Replace ("\"", "\"\"") + "\");");
					more_states = CreateState (mtp, stateindex);
					stateindex++;

					if (with_result) {
						mtp.Clear (out resultHint);
						WriteLine ("mtp.Clear (out resultHint);");
						WriteLine ("Assert.AreEqual ({0}, resultHint, \"{1}#{2}\");", GetStringValue (resultHint), TestName, (counter++).ToString ());
					} else {
						mtp.Clear ();
						WriteLine ("mtp.Clear ();");
					}
					WriteAssertProperties (mtp, Name, TestName, ref counter);
					WriteTestEnd ();
				} while (more_states);
			}
			WriteTestFooter ();
		}
		static void GenerateAdd_string_int_MaskedTextResultHint_Test ()
		{
			string Name = "mtp";
			string TestName = MethodInfo.GetCurrentMethod ().Name.Replace ("Generate", "");
			int counter = 0;

			WriteTestHeader (TestName, "MaskedTextProvider mtp;", "int testPosition;", "MaskedTextResultHint resultHint;", "bool result;", "int Int32_out = 0;", "MaskedTextResultHint MaskedTextResultHint_out = MaskedTextResultHint.Unknown;");

			MS_System_ComponentModel.MaskedTextProvider mtp = null;
			int testPosition = 0;
			MS_System_ComponentModel.MaskedTextResultHint resultHint = MS_System_ComponentModel.MaskedTextResultHint.Unknown;

			bool result;

			foreach (string mask in test_masks) {
				foreach (string [] strings in add_string_test_values) {
					foreach (string s in strings) {
						bool more_states = true;
						int stateindex = 0;
						do {

							object [] arguments;
							arguments = new object [] { s, testPosition, resultHint };
							if (Compare ("Add", mask, ref stateindex, arguments, ref more_states)) {
								continue;
							}
							WriteTestStart ();
							mtp = new MS_System_ComponentModel.MaskedTextProvider (mask);
							WriteLine ("mtp = new MaskedTextProvider (@\"" + mask.Replace ("\"", "\"\"") + "\");");
							more_states = CreateState (mtp, stateindex);
							stateindex++;

							result = mtp.Add (s, out testPosition, out resultHint);
							WriteLineNonFormat ("result = mtp.Add (@\"" + s.Replace ("\"", "\"\"") + "\", out testPosition, out resultHint);");
							WriteLine ("Assert.AreEqual ({0}, result, \"{1}#{2}\");", GetStringValue (result), TestName, (counter++).ToString ());
							WriteLine ("Assert.AreEqual ({0}, resultHint, \"{1}#{2}\");", GetStringValue (resultHint), TestName, (counter++).ToString ());
							WriteLine ("Assert.AreEqual ({0}, testPosition, \"{1}#{2}\");", GetStringValue (testPosition), TestName, (counter++).ToString ());
							WriteAssertProperties (mtp, Name, TestName, ref counter);
							WriteLine ("");
							WriteTestEnd ();
						} while (more_states);
					}
				}
			}
			WriteTestFooter ();
		}
		static void GenerateAdd_char_Test ()
		{
			string Name = "mtp";
			string TestName = MethodInfo.GetCurrentMethod ().Name.Replace ("Generate", "");
			int counter = 0;

			bool result;
			MS_System_ComponentModel.MaskedTextProvider mtp = null;

			WriteTestHeader (TestName, "MaskedTextProvider mtp;", "int testPosition;", "MaskedTextResultHint resultHint;", "bool result;", "int Int32_out = 0;", "MaskedTextResultHint MaskedTextResultHint_out = MaskedTextResultHint.Unknown;");

			foreach (string mask in test_masks) {
				foreach (char [] chars in add_char_test_values) {
					foreach (char c in chars) {
						bool more_states = true;
						int stateindex = 0;
						do {

							object [] arguments;
							arguments = new object [] { c };
							if (Compare ("Add", mask, ref stateindex, arguments, ref more_states)) {
								continue;
							}

							WriteTestStart ();
							mtp = new MS_System_ComponentModel.MaskedTextProvider (mask);
							WriteLine ("mtp = new MaskedTextProvider (@\"" + mask.Replace ("\"", "\"\"") + "\");");
							more_states = CreateState (mtp, stateindex);
							stateindex++;

							result = mtp.Add (c);
							WriteLine (string.Format ("result = mtp.Add ('\\x{0:X4}');", (int)c) + (c != char.MinValue ? "/* " + c.ToString () + " */" : "/* null */"));
							WriteLine ("Assert.AreEqual ({0}, result, \"{1}#{2}\");", GetStringValue (result), TestName, (counter++).ToString ());
							WriteAssertProperties (mtp, Name, TestName, ref counter);
							WriteTestEnd ();
						} while (more_states);
					}
				}
			}
			WriteTestFooter ();
		}
		static void GenerateToString_bool_bool_bool_int_int_Test ()
		{
			string Name = "mtp";
			string TestName = MethodInfo.GetCurrentMethod ().Name.Replace ("Generate", "");
			int counter = 0;

			WriteTestHeader (TestName, "MaskedTextProvider mtp;", "int Int32_out = 0;", "MaskedTextResultHint MaskedTextResultHint_out = MaskedTextResultHint.Unknown;");
			MS_System_ComponentModel.MaskedTextProvider mtp = null;
			//int Int32_out = 0;
			//MS_System_ComponentModel.MaskedTextResultHint MaskedTextResultHint_out = MS_System_ComponentModel.MaskedTextResultHint.Unknown;

			foreach (string mask in test_masks) {
				foreach (bool value1 in new bool [] { true, false }) {
					foreach (bool value2 in new bool [] { true, false }) {
						foreach (bool value3 in new bool [] { true, false }) {
							for (int i = -1; i < mask.Length + 1; i++) {
								for (int j = -1; j < mask.Length + 1; j++) {

									bool more_states = true;
									int stateindex = 0;
									do {
										object [] arguments;
										arguments = new object [] { value1, value2, value3, i, j };
										if (Compare ("ToString", mask, ref stateindex, arguments, ref more_states)) {
											continue;
										}

										WriteTestStart ();
										mtp = new MS_System_ComponentModel.MaskedTextProvider (mask);
										WriteLine ("mtp = new MaskedTextProvider (@\"" + mask.Replace ("\"", "\"\"") + "\");");
										more_states = CreateState (mtp, stateindex);
										stateindex++;

										WriteLine ("Assert.AreEqual ({0}, mtp.ToString ({4}, {5}, {6}, {2}, {3}), \"#{1}\");",
											GetStringValue (mtp.ToString (value1, value2, value3, i, j)), (counter++).ToString (), i.ToString (), j.ToString (), value1 ? "true" : "false", value2 ? "true" : "false", value3 ? "true" : "false");

										WriteAssertProperties (mtp, Name, TestName, ref counter);
										WriteTestEnd ();

									} while (more_states);
								}
							}
						}
					}
				}
			}

			WriteTestFooter ();
		}