mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 11:21:39 -10:00
* TestDataColumn.cs: added detection of foreign key columns.
* FooWithDefaults.cs: added foreign key columns
* FooDisplayName.cs, FooDisplayNameEmptyName.cs,
FooSettableDefaults.cs: added
2009-06-10 Marek Habersack <[email protected]>
* MetaTable.cs: fixed DisplayName implementation.
Implemented GetPrimaryKeyString, GetQuery.
2009-06-10 Marek Habersack <[email protected]>
* System.Web.DynamicData_test.dll.sources: added
Common/FooDisplayName.cs
Common/FooDisplayNameEmptyName.cs
Common/FooSettableDefaults.cs
2009-06-10 Marek Habersack <[email protected]>
* MetaTableTest.cs: added more table contexts.
Added tests for: Attributes, Columns, DataContextPropertyName,
DataContextType, DisplayName, EntityType, ForeignKeyColumnNames
(doesn't work on .NET), GetPrimaryKeyString, GetQuery,
HasPrimaryKey,
2009-06-09 Marek Habersack <[email protected]>
* MetaTableTest.cs: added two more tables for various kinds of
tests (in fixture setup).
More tests for GetActionPath.
Tests for GetPrimaryKeyValues, DisplayColumn, Attributes,
GetDisplayString, GetColumn, TryGetColumn
2009-06-09 Marek Habersack <[email protected]>
* Baz.cs, BazNoStrings.cs, BazNoStringsNoPrimary.cs,
FooDisplayColumnAttribute.cs, FooEmpty.cs,
FooEmptyDisplayColumnAttribute.cs,
FooInvalidDisplayColumnAttribute.cs, FooWithToString.cs,
TestDataColumn.cs, TestDataContainer.cs, TestDataTable.cs: added
2009-06-09 Marek Habersack <[email protected]>
* MetaTable.cs: implemented more overloads of GetActionPath.
Implemented GetPrimaryKeyValues, GetActionPathFromRoutes,
Attributes, DisplayColumn, GetDisplayString.
2009-06-09 Marek Habersack <[email protected]>
* MetaTableTest.cs: added two more tables for various kinds of
tests (in fixture setup).
More tests for GetActionPath.
Tests for GetPrimaryKeyValues.
2009-06-09 Marek Habersack <[email protected]>
* MetaTable.cs: implemented more overloads of GetActionPath.
Implemented GetPrimaryKeyValues.
Implemented GetActionPathFromRoutes.
2009-06-09 Marek Habersack <[email protected]>
* Utils.cs: added two BuildActionName methods to make building
action paths for testing more compact.
* FooNoPrimaryColumns.cs, FooNoDefaultsWithPrimaryKey.cs: added
2009-06-09 Marek Habersack <[email protected]>
* System.Web.DynamicData_test.dll.sources: added
Common/FooNoDefaultsWithPrimaryKey.cs
Common/FooNoPrimaryColumns.cs
2009-06-08 Marek Habersack <[email protected]>
* Utils.cs: added.
Moved GetModel here from MetaModelTest.cs
Added RegisterContext methods.
* FooWithDefaultsContainer.cs,
FooWithDefaultsColumn.cs,FooWithDefaultsTable.cs,
FooWithDefaults.cs: added
2009-06-08 Marek Habersack <[email protected]>
* MetaTableTest.cs: added.
svn path=/trunk/mcs/; revision=135844
35 lines
818 B
C#
35 lines
818 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Reflection;
|
|
using System.Text;
|
|
|
|
using MonoTests.ModelProviders;
|
|
using MonoTests.DataSource;
|
|
|
|
namespace MonoTests.Common
|
|
{
|
|
public class TestDataTable <DataType> : DynamicDataTable
|
|
{
|
|
public TestDataTable ()
|
|
{
|
|
this.DataType = typeof (DataType);
|
|
this.Name = typeof (DataType).Name + "Table";
|
|
}
|
|
|
|
public override List<DynamicDataColumn> GetColumns ()
|
|
{
|
|
var ret = new List<DynamicDataColumn> ();
|
|
|
|
Type type = typeof (DataType);
|
|
MemberInfo[] members = type.GetMembers (BindingFlags.Public | BindingFlags.Instance);
|
|
foreach (MemberInfo mi in members) {
|
|
if (mi.MemberType != MemberTypes.Field && mi.MemberType != MemberTypes.Property)
|
|
continue;
|
|
|
|
ret.Add (new TestDataColumn <DataType> (mi));
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
}
|