Skip to content
Permalink
Browse files

[TestGeneration] adding several updates to the Umple test language wi…

…thin the umple compiler. Including Generic tests fixes: prefix, suffix and regex. Whereby a generic test template can be applied to the matches Umple elements name. Currently, this is applied for attributes only and will be updated for methods and associations in the upcoming patch.
  • Loading branch information
SultanEid committed Jan 15, 2020
1 parent b93c537 commit c734f6658e867d84d08671bf5cd8ecbc063cf4d1
Showing with 636 additions and 11,092 deletions.
  1. +11 −11 UmpleToTest/UmpleTLTemplates/association_NNToNN.ump
  2. +0 −1 build/build.deps.xml
  3. +0 −39 cruise.umple.mutation/test/cruise/umple/mutation/test/0_Double/DoubleMutation_uModel_telephone.ump
  4. +0 −175 cruise.umple.mutation/test/cruise/umple/mutation/test/0_Double/paper/Double/Feature.java
  5. +0 −302 cruise.umple.mutation/test/cruise/umple/mutation/test/0_Double/paper/Double/PhoneCall.java
  6. +0 −253 cruise.umple.mutation/test/cruise/umple/mutation/test/0_Double/paper/Double/PhoneLine.java
  7. +0 −101 cruise.umple.mutation/test/cruise/umple/mutation/test/0_Double/paper/Double/Telephone.java
  8. +0 −545 cruise.umple.mutation/test/cruise/umple/mutation/test/0_Double/paper/Double/TelephoneNumber.java
  9. +0 −247 cruise.umple.mutation/test/cruise/umple/mutation/test/0_Double/paper/Double/VoiceMailBox.java
  10. +0 −91 cruise.umple.mutation/test/cruise/umple/mutation/test/0_Double/paper/Double/VoiceMailMessage.java
  11. +0 −12 ...le.mutation/test/cruise/umple/mutation/test/0_Float/FloatMutation_uModel_attributeTyped_float.ump
  12. +0 −39 cruise.umple.mutation/test/cruise/umple/mutation/test/0_Float/FloatMutation_uModel_telephone.ump
  13. +0 −175 cruise.umple.mutation/test/cruise/umple/mutation/test/0_Float/paper/Float/Feature.java
  14. +0 −302 cruise.umple.mutation/test/cruise/umple/mutation/test/0_Float/paper/Float/PhoneCall.java
  15. +0 −253 cruise.umple.mutation/test/cruise/umple/mutation/test/0_Float/paper/Float/PhoneLine.java
  16. +0 −101 cruise.umple.mutation/test/cruise/umple/mutation/test/0_Float/paper/Float/Telephone.java
  17. +0 −545 cruise.umple.mutation/test/cruise/umple/mutation/test/0_Float/paper/Float/TelephoneNumber.java
  18. +0 −247 cruise.umple.mutation/test/cruise/umple/mutation/test/0_Float/paper/Float/VoiceMailBox.java
  19. +0 −91 cruise.umple.mutation/test/cruise/umple/mutation/test/0_Float/paper/Float/VoiceMailMessage.java
  20. +0 −52 cruise.umple.mutation/test/cruise/umple/mutation/test/0_Float/telecome/telephone/Float/A.java
  21. +0 −12 ....mutation/test/cruise/umple/mutation/test/0_Integer/IntegerMutation_uModel_attributeTyped_int.ump
  22. +0 −52 cruise.umple.mutation/test/cruise/umple/mutation/test/0_Integer/telecome/telephone/Integer/A.java
  23. +0 −39 cruise.umple.mutation/test/cruise/umple/mutation/test/0_OneToMany/OneToManyMutation_uModel.ump
  24. +0 −175 ...le.mutation/test/cruise/umple/mutation/test/0_OneToMany/telecome/telephone/OneToMany/Feature.java
  25. +0 −202 ....mutation/test/cruise/umple/mutation/test/0_OneToMany/telecome/telephone/OneToMany/PhoneCall.java
  26. +0 −253 ....mutation/test/cruise/umple/mutation/test/0_OneToMany/telecome/telephone/OneToMany/PhoneLine.java
  27. +0 −101 ....mutation/test/cruise/umple/mutation/test/0_OneToMany/telecome/telephone/OneToMany/Telephone.java
  28. +0 −508 ...ion/test/cruise/umple/mutation/test/0_OneToMany/telecome/telephone/OneToMany/TelephoneNumber.java
  29. +0 −247 ...tation/test/cruise/umple/mutation/test/0_OneToMany/telecome/telephone/OneToMany/VoiceMailBox.java
  30. +0 −91 ...on/test/cruise/umple/mutation/test/0_OneToMany/telecome/telephone/OneToMany/VoiceMailMessage.java
  31. +0 −39 .../test/cruise/umple/mutation/test/0_OneToOptionalOne/OneToOptionalOneMutation_uModel_telephone.ump
  32. +0 −175 ...e.mutation/test/cruise/umple/mutation/test/0_OneToOptionalOne/paper/OneToOptionalOne/Feature.java
  33. +0 −302 ...mutation/test/cruise/umple/mutation/test/0_OneToOptionalOne/paper/OneToOptionalOne/PhoneCall.java
  34. +0 −315 ...mutation/test/cruise/umple/mutation/test/0_OneToOptionalOne/paper/OneToOptionalOne/PhoneLine.java
  35. +0 −92 ...mutation/test/cruise/umple/mutation/test/0_OneToOptionalOne/paper/OneToOptionalOne/Telephone.java
  36. +0 −545 ...on/test/cruise/umple/mutation/test/0_OneToOptionalOne/paper/OneToOptionalOne/TelephoneNumber.java
  37. +0 −247 ...ation/test/cruise/umple/mutation/test/0_OneToOptionalOne/paper/OneToOptionalOne/VoiceMailBox.java
  38. +0 −91 ...n/test/cruise/umple/mutation/test/0_OneToOptionalOne/paper/OneToOptionalOne/VoiceMailMessage.java
  39. +0 −39 ...mutation/test/cruise/umple/mutation/test/0_OptionalOneToMany/OptionalOneToManyMutation_uModel.ump
  40. +0 −175 .../cruise/umple/mutation/test/0_OptionalOneToMany/telecome/telephone/OptionalOneToMany/Feature.java
  41. +0 −304 ...ruise/umple/mutation/test/0_OptionalOneToMany/telecome/telephone/OptionalOneToMany/PhoneCall.java
  42. +0 −253 ...ruise/umple/mutation/test/0_OptionalOneToMany/telecome/telephone/OptionalOneToMany/PhoneLine.java
  43. +0 −101 ...ruise/umple/mutation/test/0_OptionalOneToMany/telecome/telephone/OptionalOneToMany/Telephone.java
  44. +0 −546 ...umple/mutation/test/0_OptionalOneToMany/telecome/telephone/OptionalOneToMany/TelephoneNumber.java
  45. +0 −247 ...se/umple/mutation/test/0_OptionalOneToMany/telecome/telephone/OptionalOneToMany/VoiceMailBox.java
  46. +0 −91 ...mple/mutation/test/0_OptionalOneToMany/telecome/telephone/OptionalOneToMany/VoiceMailMessage.java
  47. +0 −12 ...mutation/test/cruise/umple/mutation/test/0_String/StringMutation_uModel_attributeTyped_string.ump
  48. +0 −52 cruise.umple.mutation/test/cruise/umple/mutation/test/0_String/telecome/telephone/String/A.java
  49. +0 −39 cruise.umple.mutation/test/cruise/umple/mutation/test/0_direction/directionMutation_uModel.ump
  50. +0 −9 ...umple.mutation/test/cruise/umple/mutation/test/0_direction/directionMutation_uModel_namespace.ump
  51. +0 −43 ....umple.mutation/test/cruise/umple/mutation/test/0_direction/directionMutation_uModel_useFiles.ump
  52. +0 −15 ...umple.mutation/test/cruise/umple/mutation/test/0_direction/directionMutation_uModel_useFiles1.ump
  53. +0 −15 ...umple.mutation/test/cruise/umple/mutation/test/0_direction/directionMutation_uModel_useFiles2.ump
  54. +0 −141 ...se.umple.mutation/test/cruise/umple/mutation/test/0_direction/telecome/telephone/direction/A.java
  55. +0 −28 ...se.umple.mutation/test/cruise/umple/mutation/test/0_direction/telecome/telephone/direction/B.java
  56. +0 −68 ...se.umple.mutation/test/cruise/umple/mutation/test/0_direction/telecome/telephone/direction/C.java
  57. +0 −175 ...le.mutation/test/cruise/umple/mutation/test/0_direction/telecome/telephone/direction/Feature.java
  58. +0 −302 ....mutation/test/cruise/umple/mutation/test/0_direction/telecome/telephone/direction/PhoneCall.java
  59. +0 −253 ....mutation/test/cruise/umple/mutation/test/0_direction/telecome/telephone/direction/PhoneLine.java
  60. +0 −101 ....mutation/test/cruise/umple/mutation/test/0_direction/telecome/telephone/direction/Telephone.java
  61. +0 −508 ...ion/test/cruise/umple/mutation/test/0_direction/telecome/telephone/direction/TelephoneNumber.java
  62. +0 −228 ...tation/test/cruise/umple/mutation/test/0_direction/telecome/telephone/direction/VoiceMailBox.java
  63. +0 −91 ...on/test/cruise/umple/mutation/test/0_direction/telecome/telephone/direction/VoiceMailMessage.java
  64. +1 −1 cruise.umple.test-parser/test/cruise/umple/testgenerator/jUnit/TestcaseTest.java.txt
  65. +1 −1 cruise.umple.test-parser/test/cruise/umple/testgenerator/jUnit/testGenerate_model.umpt
  66. +1 −1 ...ple.test-parser/test/cruise/umple/testgenerator/jUnit/testGenerator_jUnit_testcase_assertion.umpt
  67. +0 −5 ...rser/test/cruise/umple/testgenerator/mutest/testGenerator_JUnitGenerator_OneToManyAdd_mutest.java
  68. +0 −5 .../test/cruise/umple/testgenerator/mutest/testGenerator_JUnitGenerator_OneToManyRemove_mutest2.java
  69. +0 −5 ...arser/test/cruise/umple/testgenerator/mutest/testGenerator_JUnitGenerator_assertEqual_mutest.java
  70. +0 −5 ...arser/test/cruise/umple/testgenerator/mutest/testGenerator_JUnitGenerator_assertFalse_mutest.java
  71. +0 −5 ...parser/test/cruise/umple/testgenerator/mutest/testGenerator_JUnitGenerator_assertTrue_mutest.java
  72. +0 −5 ...ser/test/cruise/umple/testgenerator/mutest/testGenerator_JUnitGenerator_attributeType_mutest.java
  73. +0 −5 ...er/test/cruise/umple/testgenerator/mutest/testGenerator_JUnitGenerator_attributeValue_mutest.java
  74. +7 −2 cruise.umple/src/ClassDependencyNode.ump
  75. +99 −4 cruise.umple/src/Generator_CodeTest.ump
  76. +174 −12 cruise.umple/src/UmpleInternalParser_CodeTest.ump
  77. +6 −2 cruise.umple/src/umple_classes.grammar
  78. +5 −0 cruise.umple/test/cruise/umple/implementation/test/GenericTestCase.ump
  79. +12 −10 cruise.umple/test/cruise/umple/implementation/test/GenericTestCase_Integer.ump
  80. +9 −15 cruise.umple/test/cruise/umple/implementation/test/GenericTestCase_String.ump
  81. +5 −8 cruise.umple/test/cruise/umple/implementation/test/GenericTestCase_method.ump
  82. +60 −6 cruise.umple/test/cruise/umple/implementation/test/TestCaseAction.ump
  83. +2 −1 cruise.umple/test/cruise/umple/implementation/test/TestCase_AnscestralTest.ump
  84. +13 −1 cruise.umple/test/cruise/umple/implementation/test/TestTemplateTest.java
  85. +1 −1 cruise.umple/test/cruise/umple/implementation/test/TraitAssertion_multipleTraits.ump
  86. +1 −1 cruise.umple/test/cruise/umple/implementation/test/ifElseStatementTest.ump
  87. +66 −14 cruise.umple/test/cruise/umple/implementation/test/testAnscestralAbstractTest.test.txt
  88. +9 −52 cruise.umple/test/cruise/umple/implementation/test/testGenericTestcase_String.test.txt
  89. +2 −3 cruise.umple/test/cruise/umple/implementation/test/testGenericTestcase_method.test.txt
  90. +151 −18 cruise.umple/test/cruise/umple/implementation/test/testTestcaseAction.test.txt
@@ -9,20 +9,20 @@ This file creates the necessary for Optional One To Many Association
/////// Association: -- <<=theirEnd.getMultiplicity().getRange()>> <<=theirEnd.getClassName()>> ///////
//create ... without ...
Test Create<<=uClass.getName()>>Without<<=theirEnd.getClassName()>> {
<<=uClass.getName()>> <<=buffName>> = new <<=uClass.getName()>>(); \n",,));
AssertF (some<<=theirEnd.getClassName()>>.get<<=theirEnd.getRoleName().toUpperCase()>>()!= null);
<<=uClass.getName()>> <<=buffName>> = new <<=uClass.getName()>>());
AssertF (some<<=myEnd.getClassName()>>.get<<=theirEnd.getRoleName()>>()!= null);
}
//replace
<<#buffName = "some"+theirEnd.getClassName();#>>
Test Replace<<=theirEnd.getClassName()>>In<<=uClass.getName()>> {

<<=theirEnd.getClassName()>> <<=buffName>> = new <<=theirEnd.getClassName()>>();
<<=theirEnd.getClassName()>> <<=buffName>>2 = new <<=theirEnd.getClassName()>>();
<<=buffName>>.add<<=theirEnd.getClassName()>>(some<<=myEnd.getClassName()>>);
AssertEqual (1, <<=buffName>>.getNumberOf<<=myEnd.getClassName()>>s());
AssertEqual (1, <<=buffName>>.getNumberOf<<=myEnd.getClassName()>>s());
<<=myEnd.getClassName()>> <<="some"+myEnd.getClassName()>>();
<<=theirEnd.getClassName()>> <<=buffName>> ();
<<=theirEnd.getClassName()>> <<=buffName>>2 ();
<<="some"+myEnd.getClassName()>>().add<<=theirEnd.getClassName()>>(some<<=theirEnd.getClassName()>>);
AssertEqual (1, <<="some"+myEnd.getClassName()>>().getNumberOf<<=theirEnd.getClassName()>>s());
AssertEqual (1, <<="some"+myEnd.getClassName()>>().getNumberOf<<=their.getClassName()>>s());
some<<=myEnd.getClassName()>>.set<<=theirEnd.getClassName()>>(<<=buffName>>2);
AssertEqual (some<<=myEnd.getClassName()>>, <<=buffName>>2.get<<=myEnd.getClassName()>>(0));
AssertEqual (some<<=myEnd.getClassName()>>.get<<=myEnd.getClassName()>>(0), <<=buffName>>2);
}
//delete
Test Delete<<=theirEnd.getClassName()>> {
@@ -40,7 +40,7 @@ This file creates the necessary for Optional One To Many Association

Test BoundaryAtMax {

int size = <<=theirEnd.getClassName()>>.getNumberOf<<=uClass.getName()>>s();
int size = <<=myEnd.getClassName()>>.getNumberOf<<=theirEnd.getClassName()>>s();
<<=theirEnd.getClassName()>> <<=buffName>> = new <<=theirEnd.getClassName()>>();
<<#for (int i = 0; i <= size; i++) {#>>
<<=uClass.getName()>> obj<<=i>> (<<=BuffName>>);
@@ -49,7 +49,7 @@ This file creates the necessary for Optional One To Many Association
AssertEqual(size, <<=buffName>>.getNumberOf<<=uClass.getName>>s());

<<#for (int i = 0; i <= size; i++) {#>>
AssertEqual(<<=buffName>>, obj<<=i>>.getSome<<=uClass.getName()>>(0));
AssertEqual(<<=buffName>>, obj<<=i>>.get<<=theirEnd.getClassName()>>(0));
}#>>


@@ -217,7 +217,6 @@
<echo>Fetching org.eclipse.cdt.core_5.5.0.jar</echo>

<echo level="warning">WARNING: This is merely wget-itng https://cruise.site.uottawa.ca/preserved-deps/org.eclipse.cdt.core_5.5.0.201309180223.jar</echo>
<mkdir dir="${umple.deps.manual.dir}" />
<get src="https://cruise.site.uottawa.ca/preserved-deps/org.eclipse.cdt.core_5.5.0.201309180223.jar"
dest="${umple.deps.manual.dir}/"
usetimestamp="true" />

This file was deleted.

This file was deleted.

0 comments on commit c734f66

Please sign in to comment.
You can’t perform that action at this time.