summaryrefslogtreecommitdiff
path: root/ThirdParty/CsvHelper-master/tests/CsvHelper.Tests/Mappings/Attribute/MaxFieldSizeTests.cs
blob: b0a923196246ed13495c4e6d520a289a1576a32a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
using CsvHelper.Configuration;
using CsvHelper.Configuration.Attributes;
using System.Globalization;
using Xunit;

namespace CsvHelper.Tests.Mappings.Attribute
{
	public class MaxFieldSizeTests
	{
		[Fact]
		public void ConstructorAttributeTest()
		{
			var config = new CsvConfiguration(CultureInfo.InvariantCulture, typeof(Foo));
			Assert.Equal(2, config.MaxFieldSize);
		}

		[MaxFieldSize(2)]
		private class Foo { }
	}
}