Rename test sample table to sample_users and retarget tests to net10.0
This commit is contained in:
@@ -315,7 +315,7 @@ namespace DynamORM.Tests.Select
|
||||
public virtual void TestTypedScalarGroupConcat()
|
||||
{
|
||||
// This test should produce something like this:
|
||||
// select group_concat("first") AS first from "users" where "id" < 20;
|
||||
// select group_concat("first") AS first from "sample_users" where "id" < 20;
|
||||
Assert.AreEqual("Clarke,Marny,Dai,Forrest,Blossom,George,Ivory,Inez,Sigourney,Fulton,Logan,Anne,Alexandra,Adena,Lionel,Aimee,Selma,Lara,Ori",
|
||||
GetTestTable().Scalar(type: typeof(T), columns: "first:first:group_concat", id: new DynamicColumn { Operator = DynamicColumn.CompareOperator.Lt, Value = 20 }));
|
||||
}
|
||||
@@ -325,7 +325,7 @@ namespace DynamORM.Tests.Select
|
||||
public virtual void TestTypedScalarGroupConcat2()
|
||||
{
|
||||
// This test should produce something like this:
|
||||
// select group_concat("first") AS first from "users" where "id" < 20;
|
||||
// select group_concat("first") AS first from "sample_users" where "id" < 20;
|
||||
Assert.AreEqual("Clarke,Marny,Dai,Forrest,Blossom,George,Ivory,Inez,Sigourney,Fulton,Logan,Anne,Alexandra,Adena,Lionel,Aimee,Selma,Lara,Ori",
|
||||
GetTestBuilder()
|
||||
.From(x => x(typeof(T)).As(x.t))
|
||||
@@ -339,7 +339,7 @@ namespace DynamORM.Tests.Select
|
||||
public virtual void TestTypedScalarGroupConcatNoAggregateField()
|
||||
{
|
||||
// This test should produce something like this:
|
||||
// select group_concat(first) AS first from "users" where "id" < 20;
|
||||
// select group_concat(first) AS first from "sample_users" where "id" < 20;
|
||||
Assert.AreEqual("Clarke,Marny,Dai,Forrest,Blossom,George,Ivory,Inez,Sigourney,Fulton,Logan,Anne,Alexandra,Adena,Lionel,Aimee,Selma,Lara,Ori",
|
||||
GetTestTable().Scalar(type: typeof(T), columns: "group_concat(first):first", id: new DynamicColumn { Operator = DynamicColumn.CompareOperator.Lt, Value = 20 }));
|
||||
}
|
||||
@@ -349,7 +349,7 @@ namespace DynamORM.Tests.Select
|
||||
public virtual void TestTypedScalarGroupConcatNoAggregateField2()
|
||||
{
|
||||
// This test should produce something like this:
|
||||
// select group_concat("first") AS first from "users" where "id" < 20;
|
||||
// select group_concat("first") AS first from "sample_users" where "id" < 20;
|
||||
Assert.AreEqual("Clarke,Marny,Dai,Forrest,Blossom,George,Ivory,Inez,Sigourney,Fulton,Logan,Anne,Alexandra,Adena,Lionel,Aimee,Selma,Lara,Ori",
|
||||
GetTestBuilder()
|
||||
.From(x => x(typeof(T)).As(x.t))
|
||||
@@ -358,7 +358,7 @@ namespace DynamORM.Tests.Select
|
||||
.Scalar());
|
||||
}
|
||||
|
||||
/// <summary>Test something fancy... like: <code>select "first", count("first") aggregatefield from "users" group by "first" order by 2 desc;</code>.</summary>
|
||||
/// <summary>Test something fancy... like: <code>select "first", count("first") aggregatefield from "sample_users" group by "first" order by 2 desc;</code>.</summary>
|
||||
[Test]
|
||||
public virtual void TestTypedFancyAggregateQuery()
|
||||
{
|
||||
@@ -373,7 +373,7 @@ namespace DynamORM.Tests.Select
|
||||
Assert.AreEqual(1, v.Last().aggregatefield);
|
||||
}
|
||||
|
||||
/// <summary>Test something fancy... like: <code>select "first", count("first") aggregatefield from "users" group by "first" order by 2 desc;</code>.</summary>
|
||||
/// <summary>Test something fancy... like: <code>select "first", count("first") aggregatefield from "sample_users" group by "first" order by 2 desc;</code>.</summary>
|
||||
[Test]
|
||||
public virtual void TestTypedFancyAggregateQuery2()
|
||||
{
|
||||
@@ -394,14 +394,14 @@ namespace DynamORM.Tests.Select
|
||||
Assert.AreEqual(1, v.Last().aggregatefield);
|
||||
}
|
||||
|
||||
/// <summary>This time also something fancy... aggregate in aggregate <code>select AVG(LENGTH("login")) len from "users";</code>.</summary>
|
||||
/// <summary>This time also something fancy... aggregate in aggregate <code>select AVG(LENGTH("login")) len from "sample_users";</code>.</summary>
|
||||
[Test]
|
||||
public virtual void TestTypedAggregateInAggregate()
|
||||
{
|
||||
Assert.AreEqual(12.77, GetTestTable().Scalar(type: typeof(T), columns: @"length(""login""):len:avg"));
|
||||
}
|
||||
|
||||
/// <summary>This time also something fancy... aggregate in aggregate <code>select AVG(LENGTH("login")) len from "users";</code>.</summary>
|
||||
/// <summary>This time also something fancy... aggregate in aggregate <code>select AVG(LENGTH("login")) len from "sample_users";</code>.</summary>
|
||||
[Test]
|
||||
public virtual void TestTypedAggregateInAggregate2()
|
||||
{
|
||||
@@ -411,14 +411,14 @@ namespace DynamORM.Tests.Select
|
||||
.Scalar());
|
||||
}
|
||||
|
||||
/// <summary>This time also something fancy... aggregate in aggregate <code>select AVG(LENGTH("email")) len from "users";</code>.</summary>
|
||||
/// <summary>This time also something fancy... aggregate in aggregate <code>select AVG(LENGTH("email")) len from "sample_users";</code>.</summary>
|
||||
[Test]
|
||||
public virtual void TestTypedAggregateInAggregateMark2()
|
||||
{
|
||||
Assert.AreEqual(27.7, GetTestTable().Avg(type: typeof(T), columns: @"length(""email""):len"));
|
||||
}
|
||||
|
||||
/// <summary>This time also something fancy... aggregate in aggregate <code>select AVG(LENGTH("email")) len from "users";</code>.</summary>
|
||||
/// <summary>This time also something fancy... aggregate in aggregate <code>select AVG(LENGTH("email")) len from "sample_users";</code>.</summary>
|
||||
[Test]
|
||||
public virtual void TestTypedAggregateInAggregateMark3()
|
||||
{
|
||||
@@ -428,7 +428,7 @@ namespace DynamORM.Tests.Select
|
||||
.Scalar());
|
||||
}
|
||||
|
||||
/// <summary>Test emails longer than 27 chars. <code>select count(*) from "users" where length("email") > 27;</code>.</summary>
|
||||
/// <summary>Test emails longer than 27 chars. <code>select count(*) from "sample_users" where length("email") > 27;</code>.</summary>
|
||||
public virtual void TestTypedFunctionInWhere()
|
||||
{
|
||||
Assert.AreEqual(97,
|
||||
@@ -442,7 +442,7 @@ namespace DynamORM.Tests.Select
|
||||
}));
|
||||
}
|
||||
|
||||
/// <summary>Test emails longer than 27 chars. <code>select count(*) from "users" where length("email") > 27;</code>.</summary>
|
||||
/// <summary>Test emails longer than 27 chars. <code>select count(*) from "sample_users" where length("email") > 27;</code>.</summary>
|
||||
public virtual void TestTypedFunctionInWhere2()
|
||||
{
|
||||
Assert.AreEqual(97, GetTestBuilder()
|
||||
@@ -807,7 +807,7 @@ namespace DynamORM.Tests.Select
|
||||
public virtual void TestGenericScalarGroupConcat()
|
||||
{
|
||||
// This test should produce something like this:
|
||||
// select group_concat("first") AS first from "users" where "id" < 20;
|
||||
// select group_concat("first") AS first from "sample_users" where "id" < 20;
|
||||
Assert.AreEqual("Clarke,Marny,Dai,Forrest,Blossom,George,Ivory,Inez,Sigourney,Fulton,Logan,Anne,Alexandra,Adena,Lionel,Aimee,Selma,Lara,Ori",
|
||||
GetTestTable().Scalar<T>(columns: "first:first:group_concat", id: new DynamicColumn { Operator = DynamicColumn.CompareOperator.Lt, Value = 20 }));
|
||||
}
|
||||
@@ -817,12 +817,12 @@ namespace DynamORM.Tests.Select
|
||||
public virtual void TestGenericScalarGroupConcatNoAggregateField()
|
||||
{
|
||||
// This test should produce something like this:
|
||||
// select group_concat(first) AS first from "users" where "id" < 20;
|
||||
// select group_concat(first) AS first from "sample_users" where "id" < 20;
|
||||
Assert.AreEqual("Clarke,Marny,Dai,Forrest,Blossom,George,Ivory,Inez,Sigourney,Fulton,Logan,Anne,Alexandra,Adena,Lionel,Aimee,Selma,Lara,Ori",
|
||||
GetTestTable().Scalar<T>(columns: "group_concat(first):first", id: new DynamicColumn { Operator = DynamicColumn.CompareOperator.Lt, Value = 20 }));
|
||||
}
|
||||
|
||||
/// <summary>Test something fancy... like: <code>select "first", count("first") aggregatefield from "users" group by "first" order by 2 desc;</code>.</summary>
|
||||
/// <summary>Test something fancy... like: <code>select "first", count("first") aggregatefield from "sample_users" group by "first" order by 2 desc;</code>.</summary>
|
||||
[Test]
|
||||
public virtual void TestGenericFancyAggregateQuery()
|
||||
{
|
||||
@@ -837,21 +837,21 @@ namespace DynamORM.Tests.Select
|
||||
Assert.AreEqual(1, v.Last().aggregatefield);
|
||||
}
|
||||
|
||||
/// <summary>This time also something fancy... aggregate in aggregate <code>select AVG(LENGTH("login")) len from "users";</code>.</summary>
|
||||
/// <summary>This time also something fancy... aggregate in aggregate <code>select AVG(LENGTH("login")) len from "sample_users";</code>.</summary>
|
||||
[Test]
|
||||
public virtual void TestGenericAggregateInAggregate()
|
||||
{
|
||||
Assert.AreEqual(12.77, GetTestTable().Scalar<T>(columns: @"length(""login""):len:avg"));
|
||||
}
|
||||
|
||||
/// <summary>This time also something fancy... aggregate in aggregate <code>select AVG(LENGTH("email")) len from "users";</code>.</summary>
|
||||
/// <summary>This time also something fancy... aggregate in aggregate <code>select AVG(LENGTH("email")) len from "sample_users";</code>.</summary>
|
||||
[Test]
|
||||
public virtual void TestGenericAggregateInAggregateMark2()
|
||||
{
|
||||
Assert.AreEqual(27.7, GetTestTable().Avg<T>(columns: @"length(""email""):len"));
|
||||
}
|
||||
|
||||
/// <summary>Test emails longer than 27 chars. <code>select count(*) from "users" where length("email") > 27;</code>.</summary>
|
||||
/// <summary>Test emails longer than 27 chars. <code>select count(*) from "sample_users" where length("email") > 27;</code>.</summary>
|
||||
public virtual void TestGenericFunctionInWhere()
|
||||
{
|
||||
Assert.AreEqual(97,
|
||||
|
||||
Reference in New Issue
Block a user