Skip to content

Commit

Permalink
Query: Add TPT variation for ManyToMany tests
Browse files Browse the repository at this point in the history
This also cover some split queries

Part of #21510
  • Loading branch information
smitpatel committed Jul 6, 2020
1 parent 83e3977 commit 8506c4c
Show file tree
Hide file tree
Showing 11 changed files with 3,394 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

namespace Microsoft.EntityFrameworkCore.Query
{
public abstract class TPTManyToManyNoTrackingQueryRelationalTestBase<TFixture> : ManyToManyNoTrackingQueryRelationalTestBase<TFixture>
where TFixture : TPTManyToManyQueryRelationalFixture, new()
{
protected TPTManyToManyNoTrackingQueryRelationalTestBase(TFixture fixture)
: base(fixture)
{
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using Microsoft.EntityFrameworkCore.TestModels.ManyToManyModel;

namespace Microsoft.EntityFrameworkCore.Query
{
public abstract class TPTManyToManyQueryRelationalFixture : ManyToManyQueryRelationalFixture
{
protected override string StoreName { get; } = "TPTManyToManyQueryTest";

protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext context)
{
base.OnModelCreating(modelBuilder, context);

modelBuilder.Entity<EntityRoot>().ToTable("Roots");
modelBuilder.Entity<EntityBranch>().ToTable("Branches");
modelBuilder.Entity<EntityLeaf>().ToTable("Leaves");
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

namespace Microsoft.EntityFrameworkCore.Query
{
public abstract class TPTManyToManyQueryRelationalTestBase<TFixture> : ManyToManyQueryRelationalTestBase<TFixture>
where TFixture : TPTManyToManyQueryRelationalFixture, new()
{
protected TPTManyToManyQueryRelationalTestBase(TFixture fixture)
: base(fixture)
{
}
}
}
Loading

0 comments on commit 8506c4c

Please sign in to comment.