We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6bf83cc commit 015b7ffCopy full SHA for 015b7ff
1 file changed
JSONAPI.EntityFramework.Tests/DbContextExtensionsTests.cs
@@ -30,6 +30,11 @@ private class NotAnEntity
30
public string Temporary { get; set; }
31
}
32
33
+ private class SubPost : Post
34
+ {
35
+ public string Foo { get; set; }
36
+ }
37
+
38
private DbConnection _conn;
39
private TestDbContext _context;
40
@@ -77,6 +82,17 @@ public void GetKeyNamesNonStandardIdTest()
77
82
keyNames.First().Should().Be("Url");
78
83
79
84
85
+ [TestMethod]
86
+ public void GetKeyNamesForChildClass()
87
88
+ // Act
89
+ IEnumerable<string> keyNames = _context.GetKeyNames(typeof(SubPost)).ToArray();
90
91
+ // Assert
92
+ keyNames.Count().Should().Be(1);
93
+ keyNames.First().Should().Be("Id");
94
95
80
96
[TestMethod]
81
97
public void GetKeyNamesNotAnEntityTest()
98
{
0 commit comments