Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
javers/javers-core/src/test/groovy/org/javers/core/cases/Case640InterfaceGettersInheritance.groovy
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
33 lines (27 sloc)
822 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.javers.core.cases | |
import org.javers.core.Javers | |
import org.javers.core.JaversBuilder | |
import org.javers.core.MappingStyle | |
import org.javers.core.metamodel.clazz.EntityDefinition | |
import spock.lang.Specification | |
/** | |
* @author bartosz.walacik | |
*/ | |
class Case640InterfaceGettersInheritance extends Specification { | |
interface WithId { | |
String getId() | |
void setId(String id) | |
} | |
interface MyObject extends WithId, Serializable { | |
//getId() should be inherited | |
} | |
def "should ... "(){ | |
given: | |
Javers javers = JaversBuilder.javers() | |
.withMappingStyle(MappingStyle.BEAN) | |
.registerEntity(new EntityDefinition(MyObject.class, "id")) | |
.build() | |
expect: | |
javers.getTypeMapping(MyObject).idProperty.name == "id" | |
} | |
} |