public void ReadName_reads_user_defined_id_field() { IdReader.SetIdMember <TestModel8>("entityId"); var name = IdReader.ReadName <TestModel8>(); name.Should().Be("entityId"); }
public void ReadName_reads_user_defined_id_property() { IdReader.SetIdMember <TestModel7>("MyId"); var name = IdReader.ReadName <TestModel7>(); name.Should().Be("MyId"); }
public void ReadName_reads_Id_field() { var name = IdReader.ReadName <TestModel2>(); name.Should().Be("Id"); }
public void ReadName_reads_Id_property() { var name = IdReader.ReadName <TestModel>(); name.Should().Be("Id"); }
public void ReadName_throws_when_no_id_field_present() { Assert.That(() => IdReader.ReadName <TestMetadata>(), Throws.ArgumentException); }
public void ReadName_reads_underscore_id_field() { var name = IdReader.ReadName <TestModel6>(); name.Should().Be("_id"); }
public void ReadName_reads_lowercase_id_field() { var name = IdReader.ReadName <TestModel4>(); name.Should().Be("id"); }