Skip to content
Permalink
Browse files

[TestGeneration] Updating tests for TestGenerator and test templates

  • Loading branch information
SultanEid committed Mar 16, 2020
1 parent 7514bec commit d1ab0c24c70fb8e6a24c962652cf077e18e6ea5d
Showing with 6,551 additions and 1,223 deletions.
  1. +15 −9 UmpleToTest/UmpleTLTemplates/association_ManyToOne.ump
  2. +2 −0 UmpleToTest/UmpleTLTemplates/association_ManyToOptionalOne.ump
  3. +19 −54 UmpleToTest/UmpleTLTemplates/association_NNToMany.ump
  4. +34 −21 UmpleToTest/UmpleTLTemplates/association_OneToMany.ump
  5. +35 −2 UmpleToTest/UmpleTLTemplates/association_optionlOneToMany.ump
  6. +19 −28 UmpleToTest/UmpleTLTemplates/attribute_Defaulted.ump
  7. +15 −2 UmpleToTest/UmpleTLTemplates/members_AllAttributes.ump
  8. +75 −2 cruise.umple/src/Generator_CodeTest.ump
  9. +91 −0 cruise.umple/test/cruise/umple/implementation/test/ATest.umpt
  10. +1 −1 cruise.umple/test/cruise/umple/implementation/test/Airline/test/AirlineTest.umpt
  11. +1 −1 cruise.umple/test/cruise/umple/implementation/test/Airline/test/BookingTest.umpt
  12. +1 −1 cruise.umple/test/cruise/umple/implementation/test/Airline/test/EmployeeRoleTest.umpt
  13. +36 −42 ...mple/implementation/test/Airline/test/GenericTestCase_association_optionalOneToOne_ModelTest.umpt
  14. +1 −1 cruise.umple/test/cruise/umple/implementation/test/Airline/test/PassengerRoleTest.umpt
  15. +1 −1 cruise.umple/test/cruise/umple/implementation/test/Airline/test/PersonRoleTest.umpt
  16. +1 −1 cruise.umple/test/cruise/umple/implementation/test/Airline/test/PersonTest.umpt
  17. +1 −1 cruise.umple/test/cruise/umple/implementation/test/Airline/test/RegularFlightTest.umpt
  18. +1 −1 cruise.umple/test/cruise/umple/implementation/test/Airline/test/SpecificFlightTest.umpt
  19. +79 −0 cruise.umple/test/cruise/umple/implementation/test/BTest.umpt
  20. +29 −0 cruise.umple/test/cruise/umple/implementation/test/CTest.umpt
  21. +44 −0 cruise.umple/test/cruise/umple/implementation/test/CalculatorTest.umpt
  22. +77 −0 cruise.umple/test/cruise/umple/implementation/test/ClassAssertionTest.umpt
  23. +31 −0 cruise.umple/test/cruise/umple/implementation/test/ClassAssertion_ModelTest.umpt
  24. +3 −2 cruise.umple/test/cruise/umple/implementation/test/ClassTemplateTest_AssociationAttributes.test.txt
  25. +1 −1 ...e.umple/test/cruise/umple/implementation/test/ClassTemplateTest_AssociationInlineComment.test.txt
  26. +1 −1 ...mple/test/cruise/umple/implementation/test/ClassTemplateTest_AssociationMultilineComment.test.txt
  27. +12 −7 cruise.umple/test/cruise/umple/implementation/test/ClassTemplateTest_AttributeInlineComment.test.txt
  28. +12 −7 ....umple/test/cruise/umple/implementation/test/ClassTemplateTest_AttributeMultilineComment.test.txt
  29. +235 −130 cruise.umple/test/cruise/umple/implementation/test/ClassTemplateTest_Attributes.test.txt
  30. +1 −1 ...umple/test/cruise/umple/implementation/test/ClassTemplateTest_ClassCommentWithEmptyLines.test.txt
  31. +1 −1 cruise.umple/test/cruise/umple/implementation/test/ClassTemplateTest_CodeInjectionsBasic.test.txt
  32. +1 −1 cruise.umple/test/cruise/umple/implementation/test/ClassTemplateTest_CodeInjectionsComments.test.txt
  33. +1 −1 cruise.umple/test/cruise/umple/implementation/test/ClassTemplateTest_CodeInjectionsNoBraces.test.txt
  34. +1 −1 ...le/test/cruise/umple/implementation/test/ClassTemplateTest_CodeInjectionsParametersMulti.test.txt
  35. +1 −1 ...t/cruise/umple/implementation/test/ClassTemplateTest_CodeInjectionsParametersUnspecified.test.txt
  36. +1 −1 ...e.umple/test/cruise/umple/implementation/test/ClassTemplateTest_CodeInjectionsSingleLine.test.txt
  37. +1 −1 cruise.umple/test/cruise/umple/implementation/test/ClassTemplateTest_Comment.test.txt
  38. +1 −1 cruise.umple/test/cruise/umple/implementation/test/ClassTemplateTest_Depend.test.txt
  39. +1 −1 cruise.umple/test/cruise/umple/implementation/test/ClassTemplateTest_EmptyClass.test.txt
  40. +13 −7 cruise.umple/test/cruise/umple/implementation/test/ClassTemplateTest_EmptyStringAttr.test.txt
  41. +1 −1 cruise.umple/test/cruise/umple/implementation/test/ClassTemplateTest_GarbageComment.test.txt
  42. +1 −1 cruise.umple/test/cruise/umple/implementation/test/ClassTemplateTest_IsA.test.txt
  43. +12 −7 cruise.umple/test/cruise/umple/implementation/test/ClassTemplateTest_IsA2.test.txt
  44. +3 −2 cruise.umple/test/cruise/umple/implementation/test/ClassTemplateTest_ListAttributes.test.txt
  45. +1 −1 ...mple/test/cruise/umple/implementation/test/ClassTemplateTest_MethodCommentWithEmptyLines.test.txt
  46. +1 −1 cruise.umple/test/cruise/umple/implementation/test/ClassTemplateTest_MethodInlineComment.test.txt
  47. +1 −1 cruise.umple/test/cruise/umple/implementation/test/ClassTemplateTest_MethodMultilineComment.test.txt
  48. +1 −1 cruise.umple/test/cruise/umple/implementation/test/ClassTemplateTest_MultiComment.test.txt
  49. +1 −1 cruise.umple/test/cruise/umple/implementation/test/ClassTemplateTest_MultiLineComment.test.txt
  50. +1 −1 ...mple/test/cruise/umple/implementation/test/ClassTemplateTest_MultipleAssociationComments.test.txt
  51. +45 −25 ....umple/test/cruise/umple/implementation/test/ClassTemplateTest_MultipleAttributeComments.test.txt
  52. +1 −1 cruise.umple/test/cruise/umple/implementation/test/ClassTemplateTest_MultipleMethodComments.test.txt
  53. +1 −1 cruise.umple/test/cruise/umple/implementation/test/ClassTemplateTest_NoNamespaceClass.test.txt
  54. +29 −0 cruise.umple/test/cruise/umple/implementation/test/ControllerTest.umpt
  55. +29 −0 cruise.umple/test/cruise/umple/implementation/test/CorporateClientTest.umpt
  56. +62 −0 cruise.umple/test/cruise/umple/implementation/test/CourseTest.umpt
  57. +31 −0 cruise.umple/test/cruise/umple/implementation/test/GenericTestCase_Integer_ModelTest.umpt
  58. +31 −0 cruise.umple/test/cruise/umple/implementation/test/GenericTestCase_ModelTest.umpt
  59. +31 −0 cruise.umple/test/cruise/umple/implementation/test/GenericTestCase_String_ModelTest.umpt
  60. +240 −0 cruise.umple/test/cruise/umple/implementation/test/GenericTestCase_association_ModelTest.umpt
  61. +135 −0 ...umple/test/cruise/umple/implementation/test/GenericTestCase_association_manyToMany_ModelTest.umpt
  62. +135 −0 .../test/cruise/umple/implementation/test/GenericTestCase_association_manyToMany_RNav_ModelTest.umpt
  63. +240 −0 ....umple/test/cruise/umple/implementation/test/GenericTestCase_association_oneToMany_ModelTest.umpt
  64. +240 −0 ...e/test/cruise/umple/implementation/test/GenericTestCase_association_oneToMany_RNav_ModelTest.umpt
  65. +240 −0 ...est/cruise/umple/implementation/test/GenericTestCase_association_optionalOneToMany_ModelTest.umpt
  66. +240 −0 ...ruise/umple/implementation/test/GenericTestCase_association_optionalOneToMany_RNav_ModelTest.umpt
  67. +33 −42 cruise.umple/test/cruise/umple/implementation/test/GenericTestCase_association_optionalOneToOne.ump
  68. +144 −0 ...test/cruise/umple/implementation/test/GenericTestCase_association_optionalOneToOne_ModelTest.umpt
  69. +140 −0 ...cruise/umple/implementation/test/GenericTestCase_association_optionalOneToOne_RNav_ModelTest.umpt
  70. +138 −0 ...umple/test/cruise/umple/implementation/test/GenericTestCase_association_toSingular_ModelTest.umpt
  71. +31 −0 cruise.umple/test/cruise/umple/implementation/test/GenericTestCase_attribute_prefix_ModelTest.umpt
  72. +31 −0 cruise.umple/test/cruise/umple/implementation/test/GenericTestCase_attribute_regex_ModelTest.umpt
  73. +31 −0 cruise.umple/test/cruise/umple/implementation/test/GenericTestCase_attribute_suffix_ModelTest.umpt
  74. +31 −0 cruise.umple/test/cruise/umple/implementation/test/GenericTestCase_method_ModelTest.umpt
  75. +42 −0 cruise.umple/test/cruise/umple/implementation/test/ImmutableATest.umpt
  76. +29 −0 cruise.umple/test/cruise/umple/implementation/test/IndividualStudentTest.umpt
  77. +46 −0 cruise.umple/test/cruise/umple/implementation/test/JobTest.umpt
  78. +51 −0 cruise.umple/test/cruise/umple/implementation/test/LazyATest.umpt
  79. +31 −0 cruise.umple/test/cruise/umple/implementation/test/LazyAttribute_ModelTest.umpt
  80. +29 −0 cruise.umple/test/cruise/umple/implementation/test/Level3Test.umpt
  81. +31 −0 cruise.umple/test/cruise/umple/implementation/test/MixsetTest_ModelTest.umpt
  82. +31 −0 cruise.umple/test/cruise/umple/implementation/test/MixsetTest_SameTestMultipleMixsets_ModelTest.umpt
  83. +31 −0 cruise.umple/test/cruise/umple/implementation/test/MixsetTest_action_ModelTest.umpt
  84. +31 −0 cruise.umple/test/cruise/umple/implementation/test/MixsetTest_multiple_ModelTest.umpt
  85. +81 −0 cruise.umple/test/cruise/umple/implementation/test/NNToManyAssociation_ModelTest.umpt
  86. +29 −0 cruise.umple/test/cruise/umple/implementation/test/NumberTest.umpt
  87. +24 −5 cruise.umple/test/cruise/umple/implementation/test/OneToManyAssociation.ump
  88. +470 −0 cruise.umple/test/cruise/umple/implementation/test/OneToManyAssociation_ModelTest.umpt
  89. +132 −0 cruise.umple/test/cruise/umple/implementation/test/OptionalOneToManyAssociation_ModelTest.umpt
  90. +29 −0 cruise.umple/test/cruise/umple/implementation/test/OrganizationTest.umpt
  91. +61 −0 cruise.umple/test/cruise/umple/implementation/test/PersonTest.umpt
  92. +45 −0 cruise.umple/test/cruise/umple/implementation/test/ScoreTest.umpt
  93. +3 −3 cruise.umple/test/cruise/umple/implementation/test/TestCaseAction.ump
  94. +379 −0 cruise.umple/test/cruise/umple/implementation/test/TestCaseAction_ModelTest.umpt
  95. +31 −0 cruise.umple/test/cruise/umple/implementation/test/TestCaseAction_trait_ModelTest.umpt
  96. +31 −0 cruise.umple/test/cruise/umple/implementation/test/TestCase_AbstractTest_ModelTest.umpt
  97. +35 −0 cruise.umple/test/cruise/umple/implementation/test/TestCase_AnscestralTest_ModelTest.umpt
  98. +31 −0 cruise.umple/test/cruise/umple/implementation/test/TestSequence_noTestCases_ModelTest.umpt
  99. +31 −0 cruise.umple/test/cruise/umple/implementation/test/TraitAssertion_ModelTest.umpt
  100. +31 −0 ....umple/test/cruise/umple/implementation/test/TraitAssertion_SameTestMultipleTraits_ModelTest.umpt
  101. +31 −0 cruise.umple/test/cruise/umple/implementation/test/TraitAssertion_multipleTraits_ModelTest.umpt
  102. +29 −0 cruise.umple/test/cruise/umple/implementation/test/XTest.umpt
  103. +29 −0 cruise.umple/test/cruise/umple/implementation/test/ZTest.umpt
  104. +35 −0 cruise.umple/test/cruise/umple/implementation/test/attribute_ModelTest.umpt
  105. +31 −0 cruise.umple/test/cruise/umple/implementation/test/elseStatementTest_ModelTest.umpt
  106. +31 −0 cruise.umple/test/cruise/umple/implementation/test/ifElseStatementTest_ModelTest.umpt
  107. +1 −1 cruise.umple/test/cruise/umple/implementation/test/ifStatementTest.ump
  108. +31 −0 cruise.umple/test/cruise/umple/implementation/test/ifStatementTest_ModelTest.umpt
  109. +31 −0 cruise.umple/test/cruise/umple/implementation/test/immutableAttribute_ModelTest.umpt
  110. +139 −0 cruise.umple/test/cruise/umple/implementation/test/interfaceTest_ModelTest.umpt
  111. +31 −22 cruise.umple/test/cruise/umple/implementation/test/test/ATest.umpt
  112. +23 −17 cruise.umple/test/cruise/umple/implementation/test/test/BTest.umpt
  113. +2 −2 cruise.umple/test/cruise/umple/implementation/test/test/CalculatorTest.umpt
  114. +20 −12 cruise.umple/test/cruise/umple/implementation/test/test/ClassAssertionTest.umpt
  115. +2 −2 cruise.umple/test/cruise/umple/implementation/test/test/ClassAssertion_ModelTest.umpt
  116. +2 −2 cruise.umple/test/cruise/umple/implementation/test/test/ControllerTest.umpt
  117. +2 −2 cruise.umple/test/cruise/umple/implementation/test/test/CorporateClientTest.umpt
  118. +16 −12 cruise.umple/test/cruise/umple/implementation/test/test/CourseTest.umpt
  119. +2 −2 cruise.umple/test/cruise/umple/implementation/test/test/GenericTestCase_Integer_ModelTest.umpt
  120. +2 −2 cruise.umple/test/cruise/umple/implementation/test/test/GenericTestCase_ModelTest.umpt
  121. +2 −2 cruise.umple/test/cruise/umple/implementation/test/test/GenericTestCase_String_ModelTest.umpt
  122. +3 −4 cruise.umple/test/cruise/umple/implementation/test/test/GenericTestCase_association_ModelTest.umpt
  123. +2 −2 .../test/cruise/umple/implementation/test/test/GenericTestCase_association_manyToMany_ModelTest.umpt
  124. +2 −2 .../cruise/umple/implementation/test/test/GenericTestCase_association_manyToMany_RNav_ModelTest.umpt
  125. +3 −4 ...e/test/cruise/umple/implementation/test/test/GenericTestCase_association_oneToMany_ModelTest.umpt
  126. +3 −4 ...t/cruise/umple/implementation/test/test/GenericTestCase_association_oneToMany_RNav_ModelTest.umpt
  127. +3 −4 ...ruise/umple/implementation/test/test/GenericTestCase_association_optionalOneToMany_ModelTest.umpt
  128. +3 −4 .../umple/implementation/test/test/GenericTestCase_association_optionalOneToMany_RNav_ModelTest.umpt
  129. +3 −4 ...cruise/umple/implementation/test/test/GenericTestCase_association_optionalOneToOne_ModelTest.umpt
  130. +2 −2 ...e/umple/implementation/test/test/GenericTestCase_association_optionalOneToOne_RNav_ModelTest.umpt
  131. +3 −4 .../test/cruise/umple/implementation/test/test/GenericTestCase_association_toSingular_ModelTest.umpt
  132. +2 −2 ....umple/test/cruise/umple/implementation/test/test/GenericTestCase_attribute_prefix_ModelTest.umpt
  133. +2 −2 ...e.umple/test/cruise/umple/implementation/test/test/GenericTestCase_attribute_regex_ModelTest.umpt
  134. +2 −2 ....umple/test/cruise/umple/implementation/test/test/GenericTestCase_attribute_suffix_ModelTest.umpt
  135. +2 −2 cruise.umple/test/cruise/umple/implementation/test/test/GenericTestCase_method_ModelTest.umpt
  136. +4 −4 cruise.umple/test/cruise/umple/implementation/test/test/ImmutableATest.umpt
  137. +2 −2 cruise.umple/test/cruise/umple/implementation/test/test/IndividualStudentTest.umpt
  138. +10 −7 cruise.umple/test/cruise/umple/implementation/test/test/JobTest.umpt
  139. +9 −7 cruise.umple/test/cruise/umple/implementation/test/test/LazyATest.umpt
  140. +2 −2 cruise.umple/test/cruise/umple/implementation/test/test/LazyAttribute_ModelTest.umpt
  141. +2 −2 cruise.umple/test/cruise/umple/implementation/test/test/Level3Test.umpt
  142. +2 −2 cruise.umple/test/cruise/umple/implementation/test/test/MixsetTest_ModelTest.umpt
  143. +2 −2 ...mple/test/cruise/umple/implementation/test/test/MixsetTest_SameTestMultipleMixsets_ModelTest.umpt
  144. +2 −2 cruise.umple/test/cruise/umple/implementation/test/test/MixsetTest_action_ModelTest.umpt
  145. +2 −2 cruise.umple/test/cruise/umple/implementation/test/test/MixsetTest_multiple_ModelTest.umpt
  146. +2 −2 cruise.umple/test/cruise/umple/implementation/test/test/NNToManyAssociation_ModelTest.umpt
  147. +2 −2 cruise.umple/test/cruise/umple/implementation/test/test/NumberTest.umpt
  148. +3 −4 cruise.umple/test/cruise/umple/implementation/test/test/OneToManyAssociation_ModelTest.umpt
  149. +4 −4 cruise.umple/test/cruise/umple/implementation/test/test/OptionalOneToManyAssociation_ModelTest.umpt
  150. +2 −2 cruise.umple/test/cruise/umple/implementation/test/test/OrganizationTest.umpt
  151. +23 −97 cruise.umple/test/cruise/umple/implementation/test/test/PersonTest.umpt
  152. +11 −7 cruise.umple/test/cruise/umple/implementation/test/test/ScoreTest.umpt
  153. +23 −17 cruise.umple/test/cruise/umple/implementation/test/test/StudentTest.umpt
  154. +5 −8 cruise.umple/test/cruise/umple/implementation/test/test/TestCaseAction_ModelTest.umpt
  155. +2 −2 cruise.umple/test/cruise/umple/implementation/test/test/TestCaseAction_trait_ModelTest.umpt
  156. +2 −2 cruise.umple/test/cruise/umple/implementation/test/test/TestCase_AbstractTest_ModelTest.umpt
  157. +2 −2 cruise.umple/test/cruise/umple/implementation/test/test/TestCase_AnscestralTest_ModelTest.umpt
  158. +2 −2 cruise.umple/test/cruise/umple/implementation/test/test/TestSequence_noTestCases_ModelTest.umpt
  159. +2 −2 cruise.umple/test/cruise/umple/implementation/test/test/TraitAssertion_ModelTest.umpt
  160. +2 −2 ...e/test/cruise/umple/implementation/test/test/TraitAssertion_SameTestMultipleTraits_ModelTest.umpt
  161. +2 −2 cruise.umple/test/cruise/umple/implementation/test/test/TraitAssertion_multipleTraits_ModelTest.umpt
  162. +2 −2 cruise.umple/test/cruise/umple/implementation/test/test/attribute_ModelTest.umpt
  163. +2 −2 cruise.umple/test/cruise/umple/implementation/test/test/elseStatementTest_ModelTest.umpt
  164. +2 −2 cruise.umple/test/cruise/umple/implementation/test/test/ifElseStatementTest_ModelTest.umpt
  165. +2 −2 cruise.umple/test/cruise/umple/implementation/test/test/ifStatementTest_ModelTest.umpt
  166. +2 −2 cruise.umple/test/cruise/umple/implementation/test/test/immutableAttribute_ModelTest.umpt
  167. +3 −3 cruise.umple/test/cruise/umple/implementation/test/test/interfaceTest_ModelTest.umpt
  168. +1 −1 cruise.umple/test/cruise/umple/implementation/test/testAbstractTest.test.txt
  169. +2 −2 cruise.umple/test/cruise/umple/implementation/test/testAnscestralAbstractTest.test.txt
  170. +107 −14 cruise.umple/test/cruise/umple/implementation/test/testAssociationOneToMany.test.txt
  171. +24 −14 cruise.umple/test/cruise/umple/implementation/test/testAssociationOptionalOneToMany.test.txt
  172. +74 −44 cruise.umple/test/cruise/umple/implementation/test/testAttribute.test.txt
  173. +6 −4 cruise.umple/test/cruise/umple/implementation/test/testAttributeImmutable.test.txt
  174. +17 −13 cruise.umple/test/cruise/umple/implementation/test/testAttributeLazy.test.txt
  175. +23 −13 cruise.umple/test/cruise/umple/implementation/test/testClassAssertion.test.txt
  176. +35 −20 cruise.umple/test/cruise/umple/implementation/test/testElseStatementTest.test.txt
  177. +37 −30 cruise.umple/test/cruise/umple/implementation/test/testGenericTestcase.test.txt
  178. +34 −19 cruise.umple/test/cruise/umple/implementation/test/testGenericTestcase_Integer.test.txt
  179. +31 −19 cruise.umple/test/cruise/umple/implementation/test/testGenericTestcase_String.test.txt
  180. +3 −3 cruise.umple/test/cruise/umple/implementation/test/testGenericTestcase_association.test.txt
  181. +3 −3 ...e.umple/test/cruise/umple/implementation/test/testGenericTestcase_association_manyToMany.test.txt
  182. +3 −3 ...le/test/cruise/umple/implementation/test/testGenericTestcase_association_manyToMany_RNav.test.txt
  183. +3 −3 ...se.umple/test/cruise/umple/implementation/test/testGenericTestcase_association_oneToMany.test.txt
  184. +3 −3 ...ple/test/cruise/umple/implementation/test/testGenericTestcase_association_oneToMany_RNav.test.txt
  185. +3 −3 .../test/cruise/umple/implementation/test/testGenericTestcase_association_optionalOneToMany.test.txt
  186. +3 −3 .../cruise/umple/implementation/test/testGenericTestcase_association_optionalOneToMany_RNav.test.txt
  187. +72 −30 ...e/test/cruise/umple/implementation/test/testGenericTestcase_association_optionalOneToOne.test.txt
  188. +3 −3 ...t/cruise/umple/implementation/test/testGenericTestcase_association_optionalOneToOne_RNav.test.txt
  189. +2 −2 ...e.umple/test/cruise/umple/implementation/test/testGenericTestcase_association_toSingular.test.txt
  190. +34 −19 cruise.umple/test/cruise/umple/implementation/test/testGenericTestcase_attribute_prefix.test.txt
  191. +45 −25 cruise.umple/test/cruise/umple/implementation/test/testGenericTestcase_attribute_regex.test.txt
  192. +34 −19 cruise.umple/test/cruise/umple/implementation/test/testGenericTestcase_attribute_suffix.test.txt
  193. +21 −13 cruise.umple/test/cruise/umple/implementation/test/testGenericTestcase_method.test.txt
  194. +33 −19 cruise.umple/test/cruise/umple/implementation/test/testIfElseStatementTest.test.txt
  195. +34 −20 cruise.umple/test/cruise/umple/implementation/test/testIfStatementTest.test.txt
  196. +37 −22 cruise.umple/test/cruise/umple/implementation/test/testInterfaceTest.test.txt
  197. +12 −7 cruise.umple/test/cruise/umple/implementation/test/testMixsetTest.test.txt
  198. +12 −7 cruise.umple/test/cruise/umple/implementation/test/testMixsetTest_SameTestMultipleMixsets.test.txt
  199. +12 −7 cruise.umple/test/cruise/umple/implementation/test/testMixsetTest_action.test.txt
  200. +12 −7 cruise.umple/test/cruise/umple/implementation/test/testMixsetTest_multiple.test.txt
  201. +1 −1 cruise.umple/test/cruise/umple/implementation/test/testTestSequence_noTestCases.test.txt
  202. +38 −31 cruise.umple/test/cruise/umple/implementation/test/testTestcaseAction.test.txt
  203. +12 −7 cruise.umple/test/cruise/umple/implementation/test/testTestcaseAction_trait.test.txt
  204. +12 −7 cruise.umple/test/cruise/umple/implementation/test/testTraitAssertion.test.txt
  205. +12 −7 ...se.umple/test/cruise/umple/implementation/test/testTraitAssertion_SameTestMultipleTraits.test.txt
  206. +12 −7 cruise.umple/test/cruise/umple/implementation/test/testTraitAssertion_multipleTraits.test.txt
@@ -1,7 +1,8 @@
class UmpleToTest {
association_ManyToOne <<!<</*association_ManyToOne*/>><<#


String myClass = uClass.getName();
String otherClass = av.getRelatedAssociation().getUmpleClass().getName();
String relatedAv = av.getRelatedAssociation().getUmpleClass().getName();
String buffName = "a" +uClass.getName();#>>

@@ -11,26 +12,31 @@ class UmpleToTest {
<<=gen.dependencyInjection(uClass)>>
<<=uClass.getName()>> <<=gen.initiateClass(uClass)>>;

assertTrue (a<<=uClass.getName()>>.get<<=av.getName()>>() == a<<=relatedAv>>);
assertTrue (a<<=uClass.getName()>>.get<<=otherClass>>() == a<<=relatedAv>>);
}

<<#gen.resetInitializedObject();#>>

test replaceMany<<=relatedAv>>InOne<<=myClass>>{

<<=gen.dependencyInjection(av.getRelatedAssociation().getUmpleClass())>>
<<=otherClass>> b<<=gen.initiateClass(av.getRelatedAssociation().getUmpleClass())>>;


test replace<<=relatedAv>>{

<<=gen.dependencyInjection(uClass)>>
<<=uClass.getName()>> b<<=gen.initiateClass(uClass)>>;
<<=myClass>> <<=gen.initiateClass(uClass)>>;

<<=gen.dependencyInjection(av.getRelatedAssociation().getUmpleClass())>>
<<=relatedAv>> b<<=gen.initiateClass(av.getRelatedAssociation().getUmpleClass())>>;

//<<=otherClass>> b<<=gen.initiateClass(av.getRelatedAssociation().getUmpleClass())>>;

a<<=uClass.getName()>>.set<<=relatedAv>>(ba<<=relatedAv>>);
a<<=uClass.getName()>>.set<<=relatedAv>>(ba<<=otherClass>>);

assertTrue (ba<<=relatedAv>> == a<<=uClass.getName()>>.get<<=relatedAv>>());
assertEqual ( a<<=uClass.getName()>>.get<<=relatedAv>>(),ba<<=relatedAv>>);


}

<<#gen.resetInitializedObject();#>>

<<#

@@ -22,6 +22,8 @@ This file creates the necessary for Optional One To Many Association
assertTrue (a<<=av.getUmpleClass().getName()>>.get<<=av.getRelatedAssociation().getUmpleClass().getName()>>() == null);
}

<<#gen.resetInitializedObject();#>>



!>>
@@ -4,76 +4,41 @@ class UmpleToTest {
/*
This file creates the necessary for Optional One To Many Association
*/

String myClass = uClass.getName();
String otherClass = av.getRelatedAssociation().getUmpleClass().getName();
String buffName = "some" +uClass.getName();#>>
/////// Association: -- <<=av.getRelatedAssociation().getMultiplicity().getRange()>> <<=av.getRelatedAssociation().getUmpleClass().getName()>> ///////
//create ... without ...
test Create<<=uClass.getName()>>Without<<=av.getRelatedAssociation().getUmpleClass().getName()>> {
<<=uClass.getName()>> <<=buffName>> ();
assertFalse (some<<=av.getRelatedAssociation().getUmpleClass().getName()>>.get<<=av.getRelatedAssociation().getName().toUpperCase()>>()!= null);
}
//replace
<<#buffName = "some"+av.getRelatedAssociation().getUmpleClass().getName();#>>
test Replace<<=av.getRelatedAssociation().getUmpleClass().getName()>>In<<=uClass.getName()>> {
test create<<=uClass.getName()>>Without<<=av.getRelatedAssociation().getUmpleClass().getName()>> {

<<=av.getRelatedAssociation().getUmpleClass().getName()>> <<=buffName>> ();
<<=av.getRelatedAssociation().getUmpleClass().getName()>> <<=buffName>>2 ();
<<=buffName>>.add<<=av.getRelatedAssociation().getUmpleClass().getName()>>(some<<=av.getUmpleClass().getName()>>);
assertEqual (1, <<=buffName>>.getNumberOf<<=av.getUmpleClass().getName()>>s());
some<<=av.getUmpleClass().getName()>>.set<<=av.getRelatedAssociation().getUmpleClass().getName()>>(<<=buffName>>2);
assertEqual (some<<=av.getUmpleClass().getName()>>, <<=buffName>>2.get<<=av.getUmpleClass().getName()>>(0));
}
//delete
test Delete<<=av.getRelatedAssociation().getUmpleClass().getName()>> {

<<=av.getRelatedAssociation().getUmpleClass().getName()>> <<=buffName>> ();
<<=av.getRelatedAssociation().getUmpleClass().getName()>> <<=buffName>>2 ();
<<=buffName>>.add<<=av.getRelatedAssociation().getUmpleClass().getName()>>(some<<=av.getUmpleClass().getName()>>);
<<=gen.dependencyInjection(uClass)>>
<<=myClass>> <<=gen.initiateClass(uClass)>>;

// delete <<=av.getRelatedAssociation().getUmpleClass().getName()>> in <<=uClass.getName()>>
<<=buffName>>2.delete();
assertEqual (null, <<=buffName>>2.get<<=av.getUmpleClass().getName()>>(0));
assertEqual (a<<=uClass.getName()>>.numberOf<<=otherClass>>s() , <<=av.getMultiplicity().getLowerBound()>> );
}
//boundary test

test BoundaryTest {
Integer size = <<=av.getRelatedAssociation().getUmpleClass().getName()>>.getNumberOf<<=uClass.getName()>>s();
assertTrue ( size > <<=av.getMultiplicity().getLowerBound()>>);
assertTrue ( size < <<=av.getMultiplicity().getUpperBound()>>);
test overFlowIn<<=uClass.getName()>>For<<=av.getRelatedAssociation().getUmpleClass().getName()>> {

}
<<=gen.dependencyInjection(uClass)>>
<<=myClass>> <<=gen.initiateClass(uClass)>>;

test BoundaryAtMax {
assertFalse(a<<=myClass>>.add<<=otherClass>>(a<<=otherClass>>));

<<#int size = av.getRelatedAssociation().getMultiplicity().getUpperBound();
int i =0;
int lowerBound = av.getRelatedAssociation().getMultiplicity().getLowerBound();
StringBuilder initObjects = new StringBuilder();#>>


<<#for ( i = 1; i <= lowerBound; i++){
initObjects.append(StringFormatter.format("obj{0},",i));}


#>>
assertEqual (a<<=uClass.getName()>>.numberOf<<=otherClass>>s() , <<=av.getMultiplicity().getLowerBound()>> );
}

//Maximum <<=uClass.getName()>> allowed : <<=size>>
Integer size = <<=av.getRelatedAssociation().getUmpleClass().getName()>>.getNumberOf<<=uClass.getName()>>s();
test belowBoundaryIn<<=uClass.getName()>>For<<=av.getRelatedAssociation().getUmpleClass().getName()>> {

<<#for ( i = 1; i <= lowerBound; i++){#>>
<<=uClass.getName()>> obj<<=i>> ();<<#}#>>
<<=gen.dependencyInjection(uClass)>>
<<=myClass>> <<=gen.initiateClass(uClass)>>;

<<=av.getRelatedAssociation().getUmpleClass().getName()>> <<=buffName>> = new <<=av.getRelatedAssociation().getUmpleClass().getName()>>(<<=initObjects.toString()>>);

<<#for ( i = <<=lowerBound>>; i <= size; i++){#>>
<<=uClass.getName()>> obj<<=i>> (<<=buffName>>);<<#}#>>
assertFalse(a<<=myClass>>.remove<<=otherClass>>(a2a<<=otherClass>>));

assertEqual(size, <<=buffName>>.getNumberOf<<=uClass.getName()>>s());<<#
for (i = 1; i <= size; i++) {#>>
assertEqual(<<=buffName>>, obj<<=i>>.getSome<<=uClass.getName()>>(0));<<#}#>>
assertEqual (a<<=uClass.getName()>>.numberOf<<=otherClass>>s() , <<=av.getMultiplicity().getLowerBound()>> );
}


}<<#
<<#


#>>!>>
@@ -2,6 +2,8 @@ class UmpleToTest {
association_OneToMany <<!<</*association_OneToMany*/>><<#


String myClass = uClass.getName();
String otherClass = av.getRelatedAssociation().getUmpleClass().getName();
String relatedAv = av.getRelatedAssociation().getUmpleClass().getName();
String buffName = "a" +uClass.getName();#>>

@@ -11,12 +13,12 @@ class UmpleToTest {
<<=gen.dependencyInjection(uClass)>>
<<=uClass.getName()>> <<=gen.initiateClass(uClass)>>;

assertTrue (a<<=uClass.getName()>>.numberOf<<=av.getName()>>()== 0);
assertTrue (a<<=uClass.getName()>>.numberOf<<=otherClass>>s()== 0);
}

<<#gen.resetInitializedObject();#>>


test replace<<=uClass.getName()>>In<<=av.getRelatedAssociation().getUmpleClass().getName()>> {
test replaceMandatoryOne<<=uClass.getName()>>In<<=av.getRelatedAssociation().getUmpleClass().getName()>> {

<<=gen.dependencyInjection(uClass)>>
<<=uClass.getName()>> b<<=gen.initiateClass(uClass)>>;
@@ -25,38 +27,49 @@ class UmpleToTest {
<<=relatedAv>> <<=gen.initiateClass(av.getRelatedAssociation().getUmpleClass())>>;
<<=relatedAv>> b<<=gen.initiateClass(av.getRelatedAssociation().getUmpleClass())>>;

a<<=relatedAv>>.set<<=uClass.getName()>>(ba<<=buffName>>);
assertEqual (ba<<=buffName>>, a<<=relatedAv>>.get<<=uClass.getName()>>());
assertTrue(ba<<=buffName>>.get<<=relatedAv>>(0) == a<<=relatedAv>> );
a<<=relatedAv>>.set<<=uClass.getName()>>(ba<<=myClass>>);
assertEqual (a<<=relatedAv>>.get<<=uClass.getName()>>() , ba<<=myClass>>);
assertEqual(ba<<=otherClass>>.get<<=myClass>>() , a<<=myClass>> );

}

<<#gen.resetInitializedObject();#>>

test remove<<=relatedAv>>In<<=uClass.getName()>> {

<<=gen.dependencyInjection(uClass)>>
<<=uClass.getName()>> <<=gen.initiateClass(uClass)>>;
a<<=uClass.getName()>>.add<<=relatedAv>>(a<<=relatedAv>>);
<<=uClass.getName()>> b<<=gen.initiateClass(uClass)>>;
<<=gen.dependencyInjection(av.getRelatedAssociation().getUmpleClass())>>
<<=otherClass>> <<=gen.initiateClass(av.getRelatedAssociation().getUmpleClass())>>;
a<<=uClass.getName()>>.add<<=relatedAv>>(a<<=otherClass>>);

a<<=relatedAv>>.delete();
assertEqual (a<<=uClass.getName()>>.get<<=av.getName().substring(0,(av.getName().length()-1))>>(0) == null);
a<<=otherClass>>.delete();
assertTrue (a<<=uClass.getName()>>.numberOf<<=otherClass>>s() == 0);
}


//add to new B
<<#buffName= "a"+av.getUmpleClass().getName();#>>
<<#gen.resetInitializedObject();#>>

test Add<<=av.getRelatedAssociation().getUmpleClass().getName()>>ToNew<<=uClass.getName()>> {
<<=av.getRelatedAssociation().getUmpleClass().getName()>> <<=buffName>> = new <<=av.getRelatedAssociation().getUmpleClass().getName()>>();
<<=av.getRelatedAssociation().getUmpleClass().getName()>> <<=buffName>>2 = new <<=av.getRelatedAssociation().getUmpleClass().getName()>>();

<<=av.getUmpleClass().getName()>> a<<=av.getUmpleClass().getName()>> = new <<=av.getUmpleClass().getName()>>();

<<=gen.dependencyInjection(uClass)>>
<<=uClass.getName()>> b<<=gen.initiateClass(uClass)>>;

<<=gen.dependencyInjection(av.getRelatedAssociation().getUmpleClass())>>
<<=otherClass>> <<=gen.initiateClass(av.getRelatedAssociation().getUmpleClass())>>;
<<=otherClass>> b<<=gen.initiateClass(av.getRelatedAssociation().getUmpleClass())>>;


<<=buffName>>.add<<=av.getRelatedAssociation().getUmpleClass().getName()>>(a<<=av.getRelatedAssociation().getUmpleClass().getName()>>);
<<=buffName>>.add<<=av.getRelatedAssociation().getUmpleClass().getName()>>(a<<=av.getRelatedAssociation().getUmpleClass().getName()>>2);
<<=buffName>>.add<<=av.getRelatedAssociation().getUmpleClass().getName()>>(ba<<=av.getRelatedAssociation().getUmpleClass().getName()>>);

assertEqual(a<<=av.getRelatedAssociation().getUmpleClass().getName()>>2, <<=buffName>>.get<<=av.getRelatedAssociation().getUmpleClass().getName()>>();
assertEqual (<<=buffName>>, a<<=av.getRelatedAssociation().getUmpleClass().getName()>>2.get<<=av.getUmpleClass().getName()>>(0));
assertEqual (<<=buffName>>, a<<=av.getRelatedAssociation().getUmpleClass().getName()>>.getNumberOf<<=av.getUmpleClass().getName()>>s());
}<<#
assertEqual( a<<=myClass>>.get<<=otherClass>>(1),ba<<=otherClass>>);
assertEqual ( ba<<=otherClass>>.get<<=myClass>>(), a<<=myClass>>);
assertEqual ( a<<=myClass>>.numberOf<<=otherClass>>s(), 2);
}
<<#gen.resetInitializedObject();#>>

<<#

#>>!>>
}
@@ -21,9 +21,10 @@ This file creates the necessary for Optional One To Many Association
assertTrue ( size == 0);

}
<<#gen.resetInitializedObject();#>>
//replace
<<#buffName = "some"+av.getRelatedAssociation().getUmpleClass().getName();#>>
test Replace<<=uClass.getName()>>In<<=av.getRelatedAssociation().getUmpleClass().getName()>> {
test ReplaceOptional<<=uClass.getName()>>In<<=av.getRelatedAssociation().getUmpleClass().getName()>> {

<<=av.getRelatedAssociation().getUmpleClass().getName()>> <<=gen.initiateClass(av.getRelatedAssociation().getUmpleClass())>>;
<<=av.getRelatedAssociation().getUmpleClass().getName()>> b<<=gen.initiateClass(av.getRelatedAssociation().getUmpleClass())>>;
@@ -38,7 +39,9 @@ This file creates the necessary for Optional One To Many Association
assertTrue ( a<<=av.getRelatedAssociation().getUmpleClass().getName()>>.get<<=uClass.getName()>>() == ba<<=uClass.getName()>>);
}

test delete<<=av.getRelatedAssociation().getUmpleClass().getName()>> {

<<#gen.resetInitializedObject();#>>
test delete<<=av.getRelatedAssociation().getUmpleClass().getName()>>From<<=myClass>> {
// delete <<=av.getRelatedAssociation().getUmpleClass().getName()>> in <<=uClass.getName()>>


@@ -57,6 +60,36 @@ This file creates the necessary for Optional One To Many Association
}


<<#gen.resetInitializedObject();#>>
test Add<<=av.getRelatedAssociation().getUmpleClass().getName()>>ToNew<<=uClass.getName()>> {

<<=gen.dependencyInjection(av.getRelatedAssociation().getUmpleClass())>>
<<=otherClass>> <<=gen.initiateClass(av.getRelatedAssociation().getUmpleClass())>>;

<<=gen.dependencyInjection(av.getRelatedAssociation().getUmpleClass())>>
<<=otherClass>> b<<=gen.initiateClass(av.getRelatedAssociation().getUmpleClass())>>;

<<=gen.dependencyInjection(uClass)>>
<<=uClass.getName()>> <<=gen.initiateClass(uClass)>>;

<<=gen.dependencyInjection(uClass)>>
<<=uClass.getName()>> b<<=gen.initiateClass(uClass)>>;



a<<=myClass>>.add<<=otherClass>>(a<<=otherClass>>);
ba<<=myClass>>.add<<=otherClass>>(a<<=otherClass>>);


assertEqual(ba<<=myClass>>.get<<=otherClass>>(0), a<<=otherClass>>) ;


assertEqual (a<<=myClass>>.numberOf<<=otherClass>>s(), 0);

assertEqual (ba<<=myClass>>.numberOf<<=otherClass>>s(), 1);
}
<<#gen.resetInitializedObject();#>>

<<#


@@ -1,34 +1,25 @@
class UmpleToTest{

attribute_Defaulted <<!<</*attribute_Defaulted*/>><<#

if(at.getType() == "String" || at.getType() == null)
{
#>assertTrue( a<<=uClass.getName()>>.get<<=attrName>>(), <<=at.getValue()>> );
assertTrue( a<<=uClass.getName()>>.set<<=attrName>>("someString123"));
assertTrue( a<<=uClass.getName()>>.get<<=attrName>>() =="someString123")>>");
assertTrue( a<<=uClass.getName()>>.reset<<=attrName>>());
assertFalse( a<<=uClass.getName()>>.get<<=attrName>>(),"randomString123"));
assertTrue( a<<=uClass.getName()>>.get<<=attrName>>(),<<=at.getValue()>>);
<<#
}

if(at.getType().equals("Double") || at.getType().equals("Integer"))
{#>>
assertTrue( a<<=uClass.getName()>>.set<<=attrName>>(<<=gen.translate("AttIntManu")>>)));
assertTrue( a<<=uClass.getName()>>.get<<=attrName>>() == <<=gen.translate("AttIntManu")>>));
<<#}

if(at.getType().equals("Float"))
{#>>
assertTrue( a<<=uClass.getName()>>.set<<=attrName>>(<<=gen.translate("AttFloatManu")>>)));
assertTrue( a<<=uClass.getName()>>.get<<=attrName>>() == <<=gen.translate("AttFloatManu")>>));
<<#}
/*if(at.getType().equals("Boolean"))
{
appendln(realSb("\tAssertTrue( {0}.(set{1}(true));\n",uClass.getName().toLowerCase() , attrName));
appendln(realSb("\tAssertTrue( {0}.get{1}());\n",uClass.getName().toLowerCase() , attrName, gen.translate("AttBooleanManu")));
}*/

if(at.getType().equals( "Date"))
{#>>
assertTrue(a<<=uClass.getName()>>.reset<<=attrName>>());
Date resetDate = Date.valueOf(<<=at.getValue()>>);
assertEqual( a<<=uClass.getName()>>.getDefault<<=attrName>>(), resetDate);
<<#}

else if (at.getType().equals("Time"))
{#>>
assertTrue(a<<=uClass.getName()>>.reset<<=attrName>>());
Time resetTime = Time.valueOf(<<=at.getValue()>>);
assertEqual( a<<=uClass.getName()>>.getDefault<<=attrName>>(), resetTime);
<<#}

else {
#>>assertTrue(a<<=uClass.getName()>>.reset<<=attrName>>());
assertEqual( a<<=uClass.getName()>>.getDefault<<=attrName>>(), <<=at.getValue()>> );<<#
}

#>>!>>

0 comments on commit d1ab0c2

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