public void FindsIdNamedId() { // Arrange var mm = new ModelManager(new PluralizationService()); mm.RegisterResourceType(typeof(Author)); // Act PropertyInfo idprop = mm.GetIdProperty(typeof(Author)); // Assert Assert.AreSame(typeof(Author).GetProperty("Id"), idprop); }
public void FindsIdFromAttribute() { // Arrange var mm = new ModelManager(new PluralizationService()); mm.RegisterResourceType(typeof(CustomIdModel)); // Act PropertyInfo idprop = mm.GetIdProperty(typeof(CustomIdModel)); // Assert Assert.AreSame(typeof(CustomIdModel).GetProperty("Uuid"), idprop); }