using System;
using System.Reflection;
using NUnit.Framework;
using Suteki.Common.Extensions;
using Suteki.Shop.Tests.Models.Builders;
namespace Suteki.Shop.Tests.Maps
{
/// <summary>
/// Runs a simple test for each entity listed. That it can be saved to the database and retrieved.
/// </summary>
[TestFixture]
public class SimpleMapTests : MapTestBase
{
[TestCase(typeof (PostZone))]
[TestCase(typeof (Postage))]
[TestCase(typeof (Country))]
public void SimpleMapTest(Type entityType)
{
var runSimpleMapTest = GetType().GetMethod("RunSimpleMapTest");
var runSimpleMapTestForType = runSimpleMapTest.MakeGenericMethod(entityType);
runSimpleMapTestForType.Invoke(this, new object[0]);
}
public void RunSimpleMapTest<TEntity>() where TEntity : class, new()
{
var id = 0;
Read more: DZone