Closed Aurelien-Pin closed 3 years ago
Only the renaming of features found in an empiric way are hard coded, and yes it would be better to have this in the specification model. You can choose the way you feel suited to store this information, I will adapt the generator accordingly.
Note that the existing list of renaming can be incomplete or have false renaming in it since I'm not a Capella expert.
In the test generator only some read only tests are hard coded.
This list is based on the errors thrown by the technical metamodel. This way it's still possible to test the simplified metamodel for reading until we have an API to actually write to the simplified metamodel.
use a property value to store the renamings When tests for setter and getter will be repareted, the hard coded list of read only tests will not be needed anymore see #26
Getters and setters have been separated (#26) and hard coded values removed.
It seems that mapping between simplified metamodel and implementation metamodel is hard written in in java code: https://github.com/labs4capella/python4capella/blob/master/plugins/org.eclipse.python4capella.gen/src/org/eclipse/python4capella/gen/handlers/ProduceCapellaPythonAPIFromCapellaHandler.java
This kind of mapping should be defined in the Capella model if necessary!
Moreover, auto tests seems to be hard written in the following plugin : https://github.com/labs4capella/python4capella/blob/master/plugins/org.eclipse.python4capella.gen/src/org/eclipse/python4capella/gen/handlers/ProduceCapellaPythonTestsFromCapellaHandler.java
The purpose is to generate the tests automatically