<commit_before>using System;
using System.Linq;

using FluentAssert;

using FluentWebControls.Extensions;
using FluentWebControls.Tests.Extensions;

using LinqToHtml;

using NUnit.Framework;

namespace FluentWebControls.Tests
{
	public class TextAreaDataTest
	{
		[TestFixture]
		public class When_asked_to_create_a_textarea_for_a_property
		{
			private string _id;
			private bool _isRequired;
			private string _label;
			private int? _maxLength;
			private int? _maxValue;
			private int? _minLength;
			private int? _minValue;
			private HTMLDocument _result;
			private Type _type;
			private string _value;

			[SetUp]
			public void BeforeEachTest()
			{
				_isRequired = false;
				_minLength = null;
				_maxLength = null;
				_minValue = null;
				_maxValue = null;
				_type = typeof(string);
				_id = "theId";
				_value = "value";
			}

			[Test]
			public void Given_a_label()
			{
				Test.Verify(
					with_a_label,
					when_asked_to_create_a_textarea_for_a_property,
					should_include_a_label_with_the_label_text,
					should_set_the_label_for_attribute_to_the_id_of_the_textarea
					);
			}

			[Test]
			public void Given_a_non_empty_value_without_characters_that_need_to_be_escaped()
			{
				Test.Verify(
					with_a_non_empty_value_without_characters_that_need_to_be_escaped,
					when_asked_to_create_a_textarea_for_a_property,
					should_set_the_content_to_the_value
					);
			}

			[Test]
			public void Given_a_null_value()
			{
				Test.Verify(
					with_a_null_value,
					when_asked_to_create_a_textarea_for_a_property,
					should_set_the_content_to_empty_string
					);
			}

			[Test]
			public void Given_a_value_containing_values_that_need_to_be_escaped()
			{
				Test.Verify(
					with_a_value_containing_characters_that_need_to_be_escaped,
					when_asked_to_create_a_textarea_for_a_property,
					should_set_the_content_to_the_escaped_value
					);
			}

			[Test]
			public void Given_the_Property_does_not_have_a_maximum_length()
			{
				Test.Verify(
					with_a_property_that_does_not_have_a_maximum_length,
					when_asked_to_create_a_textarea_for_a_property,
					should_not_mark_the_textarea_with_the_maximum_length
					);
			}

			[Test]
			public void Given_the_Property_does_not_have_a_minimum_length()
			{
				Test.Verify(
					with_a_property_that_does_not_have_a_minimum_length,
					when_asked_to_create_a_textarea_for_a_property,<commit_msg>remove redundancy from TextAreaData test name<commit_after>using System;
using System.Linq;

using FluentAssert;

using FluentWebControls.Extensions;
using FluentWebControls.Tests.Extensions;

using LinqToHtml;

using NUnit.Framework;

namespace FluentWebControls.Tests
{
	public class TextAreaDataTest
	{
		[TestFixture]
		public class When_asked_to_create_a_textarea_for_a_property
		{
			private string _id;
			private bool _isRequired;
			private string _label;
			private int? _maxLength;
			private int? _maxValue;
			private int? _minLength;
			private int? _minValue;
			private HTMLDocument _result;
			private Type _type;
			private string _value;

			[SetUp]
			public void BeforeEachTest()
			{
				_isRequired = false;
				_minLength = null;
				_maxLength = null;
				_minValue = null;
				_maxValue = null;
				_type = typeof(string);
				_id = "theId";
				_value = "value";
			}

			[Test]
			public void Given_a_label()
			{
				Test.Verify(
					with_a_label,
					when_asked_to_create_a_textarea_for_a_property,
					should_include_a_label_with_the_label_text,
					should_set_the_label_for_attribute_to_the_id_of_the_textarea
					);
			}

			[Test]
			public void Given_a_non_empty_value_without_characters_that_need_to_be_escaped()
			{
				Test.Verify(
					with_a_non_empty_value_without_characters_that_need_to_be_escaped,
					when_asked_to_create_a_textarea_for_a_property,
					should_set_the_content_to_the_value
					);
			}

			[Test]
			public void Given_a_null_value()
			{
				Test.Verify(
					with_a_null_value,
					when_asked_to_create_a_textarea_for_a_property,
					should_set_the_content_to_empty_string
					);
			}

			[Test]
			public void Given_a_value_containing_characters_that_need_to_be_escaped()
			{
				Test.Verify(
					with_a_value_containing_characters_that_need_to_be_escaped,
					when_asked_to_create_a_textarea_for_a_property,
					should_set_the_content_to_the_escaped_value
					);
			}

			[Test]
			public void Given_the_Property_does_not_have_a_maximum_length()
			{
				Test.Verify(
					with_a_property_that_does_not_have_a_maximum_length,
					when_asked_to_create_a_textarea_for_a_property,
					should_not_mark_the_textarea_with_the_maximum_length
					);
			}

			[Test]
			public void Given_the_Property_does_not_have_a_minimum_length()
			{
				Test.Verify(
					with_a_property_that_does_not_have_a_minimum_length,
					when_asked_to_create_a_textarea_for_a_property,
{'fraction_non_alphanumeric': 0.054890631448617416, 'fraction_numerical': 0.0, 'mean_word_length': 4.200643776824034, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4884578', 'n_tokens_mistral': 2221, 'n_tokens_neox': 1754, 'n_words': 246}