Skip to content

Commit 3795948

Browse files
committed
Revert "Add Master and Child test entities that use integer keys"
This reverts commit 2545acc.
1 parent 81f368c commit 3795948

11 files changed

Lines changed: 207 additions & 319 deletions

File tree

JSONAPI.AcceptanceTests.EntityFrameworkTestWebApp.Tests/Data/Child.csv

Lines changed: 0 additions & 7 deletions
This file was deleted.

JSONAPI.AcceptanceTests.EntityFrameworkTestWebApp.Tests/Data/Master.csv

Lines changed: 0 additions & 5 deletions
This file was deleted.

JSONAPI.AcceptanceTests.EntityFrameworkTestWebApp.Tests/FetchingResourcesTests.cs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -183,18 +183,5 @@ await AssertResponseContent(response,
183183
HttpStatusCode.OK);
184184
}
185185
}
186-
187-
[TestMethod]
188-
[DeploymentItem(@"Data\Master.csv", @"Data")]
189-
[DeploymentItem(@"Data\Child.csv", @"Data")]
190-
public async Task Get_related_to_many_integer_key()
191-
{
192-
using (var effortConnection = GetEffortConnection())
193-
{
194-
var response = await SubmitGet(effortConnection, "masters/1501/children");
195-
196-
await AssertResponseContent(response, @"Fixtures\FetchingResources\Get_related_to_many_integer_key_response.json", HttpStatusCode.OK);
197-
}
198-
}
199186
}
200187
}

JSONAPI.AcceptanceTests.EntityFrameworkTestWebApp.Tests/Fixtures/FetchingResources/Get_related_to_many_integer_key_response.json

Lines changed: 0 additions & 34 deletions
This file was deleted.

JSONAPI.AcceptanceTests.EntityFrameworkTestWebApp.Tests/JSONAPI.AcceptanceTests.EntityFrameworkTestWebApp.Tests.csproj

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,6 @@
123123
<EmbeddedResource Include="Fixtures\CreatingResources\Responses\Post_with_client_provided_id_Response.json" />
124124
<EmbeddedResource Include="Fixtures\CreatingResources\Responses\Post_with_empty_id_Response.json" />
125125
<None Include="App.config" />
126-
<None Include="Data\Child.csv">
127-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
128-
</None>
129-
<None Include="Data\Master.csv">
130-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
131-
</None>
132126
<None Include="Data\Officer.csv">
133127
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
134128
</None>
@@ -239,7 +233,6 @@
239233
<EmbeddedResource Include="Fixtures\Mapped\Responses\Get_resource_by_id_that_doesnt_exist.json" />
240234
<EmbeddedResource Include="Fixtures\Mapped\Responses\Get_related_to_one_response.json" />
241235
<EmbeddedResource Include="Fixtures\Mapped\Responses\Get_related_to_many_response.json" />
242-
<EmbeddedResource Include="Fixtures\FetchingResources\Get_related_to_many_integer_key_response.json" />
243236
<None Include="packages.config" />
244237
</ItemGroup>
245238
<Choose>

JSONAPI.AcceptanceTests.EntityFrameworkTestWebApp/JSONAPI.AcceptanceTests.EntityFrameworkTestWebApp.csproj

Lines changed: 205 additions & 207 deletions
Large diffs are not rendered by default.

JSONAPI.AcceptanceTests.EntityFrameworkTestWebApp/Models/Child.cs

Lines changed: 0 additions & 21 deletions
This file was deleted.

JSONAPI.AcceptanceTests.EntityFrameworkTestWebApp/Models/Master.cs

Lines changed: 0 additions & 16 deletions
This file was deleted.

JSONAPI.AcceptanceTests.EntityFrameworkTestWebApp/Models/TestDbContext.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,5 @@ protected override void OnModelCreating(DbModelBuilder modelBuilder)
4747
public DbSet<StarshipClass> StarshipClasses { get; set; }
4848
public DbSet<Officer> Officers { get; set; }
4949
public DbSet<StarshipOfficerLink> StarshipOfficerLinks { get; set; }
50-
public DbSet<Master> Masters { get; set; }
51-
public DbSet<Child> Children { get; set; }
5250
}
5351
}

JSONAPI.AcceptanceTests.EntityFrameworkTestWebApp/Startup.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
using JSONAPI.EntityFramework;
1414
using JSONAPI.EntityFramework.Configuration;
1515
using Owin;
16-
using System.Collections.Generic;
1716

1817
namespace JSONAPI.AcceptanceTests.EntityFrameworkTestWebApp
1918
{
@@ -34,9 +33,7 @@ public Startup(Func<TestDbContext> dbContextFactory)
3433

3534
public void Configuration(IAppBuilder app)
3635
{
37-
var configuration = new JsonApiConfiguration(
38-
new Core.PluralizationService(
39-
new Dictionary<string, string> { { "Child", "Children" } }));
36+
var configuration = new JsonApiConfiguration();
4037
configuration.RegisterEntityFrameworkResourceType<Building>();
4138
configuration.RegisterEntityFrameworkResourceType<City>();
4239
configuration.RegisterEntityFrameworkResourceType<Comment>();
@@ -61,8 +58,6 @@ public void Configuration(IAppBuilder app)
6158
rc => rc.UseMaterializer<StarshipShipCounselorRelatedResourceMaterializer>());
6259
}); // Example of a resource that is mapped from a DB entity
6360
configuration.RegisterResourceType<StarshipOfficerDto>();
64-
configuration.RegisterEntityFrameworkResourceType<Master>();
65-
configuration.RegisterEntityFrameworkResourceType<Child>();
6661

6762
var configurator = new JsonApiHttpAutofacConfigurator();
6863
configurator.OnApplicationLifetimeScopeCreating(builder =>

0 commit comments

Comments
 (0)