@Test public void checkGetVariable() { Name qualifiedName = mock(Name.class); when(qualifiedName.toString()).thenReturn("Test"); TypeElement element = mock(TypeElement.class); when(element.getSimpleName()).thenReturn(qualifiedName); EntityModel entity = new EntityModel(element); ASSERT.that("test").isEqualTo(entity.getVariable()); }
@Override public String getVariable() { String mapperVariable = element.getSimpleName().toString(); return mapperVariable.substring(0, 1).toLowerCase(Locale.US) + mapperVariable.substring(1); }
EntityModel implements EntityData { @Override public String getVariable() { String mapperVariable = element.getSimpleName().toString(); return mapperVariable.substring(0, 1).toLowerCase(Locale.US) + mapperVariable.substring(1); } }
EntityModel implements EntityData { @Override public String getVariable() { String mapperVariable = element.getSimpleName().toString(); return mapperVariable.substring(0, 1).toLowerCase(Locale.US) + mapperVariable.substring(1); } EntityModel(TypeElement element); }
EntityModel implements EntityData { @Override public String getVariable() { String mapperVariable = element.getSimpleName().toString(); return mapperVariable.substring(0, 1).toLowerCase(Locale.US) + mapperVariable.substring(1); } EntityModel(TypeElement element); void fillFieldsList(Helper helper, List<EntityModel> models); Element getElement(); @Override String getName(); @Override String getFullQualifiedName(); @Override String getPackage(); @Override String getVariable(); MapperModel getMapper(); boolean hasAnnotationValue(); String getAnnotationValue(); List<FieldModel> getFields(); List<EntityModel> getDependencies(); }
EntityModel implements EntityData { @Override public String getVariable() { String mapperVariable = element.getSimpleName().toString(); return mapperVariable.substring(0, 1).toLowerCase(Locale.US) + mapperVariable.substring(1); } EntityModel(TypeElement element); void fillFieldsList(Helper helper, List<EntityModel> models); Element getElement(); @Override String getName(); @Override String getFullQualifiedName(); @Override String getPackage(); @Override String getVariable(); MapperModel getMapper(); boolean hasAnnotationValue(); String getAnnotationValue(); List<FieldModel> getFields(); List<EntityModel> getDependencies();  }