public void TestGetColumnNameMultiEntity() { string companyResult = DynamicPropertyHelper.GetColumnName(typeof(PropertyHelperTestCompany), "Name"); string personResult = DynamicPropertyHelper.GetColumnName(typeof(TestPerson), "LastName"); Assert.Equal("name", companyResult); Assert.Equal("lastname", personResult); }
public void TestConcurrentInitialization() { var tasks = new List <Task <string> >(); for (int i = 0; i < 10; i++) { tasks.Add(Task.Run(() => DynamicPropertyHelper.GetColumnName <PropertyHelperTestCompany>("Name"))); } Task.WaitAll(tasks.ToArray()); }
public void Add(string property, EOperator op, int level, InterRestrictionOperator interOperator, object value) { string column = DynamicPropertyHelper.GetColumnName <T>(property); AddRestriction <T>(column, op, interOperator, level, value); }
public void TestGetColumnName() { string result = DynamicPropertyHelper.GetColumnName(typeof(PropertyHelperTestCompany), "Id"); Assert.Equal("id", result); }
protected override Expression VisitMember(MemberExpression expression) { _column = DynamicPropertyHelper.GetColumnName(expression.Member.DeclaringType, expression.Member.Name); return expression; }
public void TestColumnConfigProvider() { string test1Column = DynamicPropertyHelper.GetColumnName(typeof(TestAddress), nameof(TestAddress.Test1)); Assert.Equal(MockColumnConfigProvider.SUCCESS_COLUMN_NAME, test1Column); }