view HowTo/DataAccess/Format.cs @ 4:f757da6161a1

!bug 100 + 2h fixed gregression
author cin
date Sun, 24 Aug 2014 17:57:42 +0400
parents f990fcb411a9
children
line wrap: on
line source

using System;
using System.Collections.Generic;

using NUnit.Framework;

using BLToolkit.DataAccess;

namespace HowTo.DataAccess
{
	[TestFixture]
	public class Format
	{
		public abstract class PersonAccessor : DataAccessor
		{
			[SqlQuery("SELECT TOP {0} * FROM Person")]
			public abstract List<Person> GetPersonList([/*[a]*/Format/*[/a]*/] int top);
		}

		[Test]
		public void Test()
		{
			PersonAccessor pa   = DataAccessor.CreateInstance<PersonAccessor>();
			List<Person>   list = pa.GetPersonList(2);

			Assert.That(list,       Is.Not.Null);
			Assert.That(list.Count, Is.LessThanOrEqualTo(2));
		}
	}
}