Skip to content
Permalink
Browse files

modified templates and test files for ruby

  • Loading branch information...
fjtheknight committed Jun 3, 2019
1 parent b171966 commit 0e37c840a7e4cd3c362e30969620deac92fdd53e
Showing with 36 additions and 36 deletions.
  1. +1 −1 UmpleToRuby/UmpleTLTemplates/constructor_AssociationAssignImmutableOptionalMany.ump
  2. +1 −1 UmpleToRuby/UmpleTLTemplates/constructor_AssociationAssignImmutableOptionalN.ump
  3. +2 −2 UmpleToRuby/UmpleTLTemplates/constructor_AssociationAssignMandatoryMany.ump
  4. +1 −1 UmpleToRuby/UmpleTLTemplates/constructor_AssociationAssignOne.ump
  5. +1 −1 UmpleToRuby/UmpleTLTemplates/constructor_AssociationAssignUndirectionalOne.ump
  6. +1 −1 UmpleToRuby/UmpleTLTemplates/constructor_AttributeAssignUnique.ump
  7. +1 −1 cruise.umple/test/cruise/umple/implementation/ruby/ClassTemplateTest_Attributes.ruby.txt
  8. +1 −1 cruise.umple/test/cruise/umple/implementation/ruby/ClassTemplateTest_Import2.ruby.txt
  9. +4 −4 cruise.umple/test/cruise/umple/implementation/ruby/CodeInjectionTest_Association.ruby.txt
  10. +1 −1 cruise.umple/test/cruise/umple/implementation/ruby/ImmutableUnidirectionalMNTest.ruby.txt
  11. +1 −1 cruise.umple/test/cruise/umple/implementation/ruby/ImmutableUnidirectionalMStarTest.ruby.txt
  12. +1 −1 cruise.umple/test/cruise/umple/implementation/ruby/ImmutableUnidirectionalManyTest.ruby.txt
  13. +1 −1 cruise.umple/test/cruise/umple/implementation/ruby/ImmutableUnidirectionalNTest.ruby.txt
  14. +1 −1 cruise.umple/test/cruise/umple/implementation/ruby/ImmutableUnidirectionalOneTest.ruby.txt
  15. +1 −1 cruise.umple/test/cruise/umple/implementation/ruby/ImmutableUnidirectionalOptionalNTest.ruby.txt
  16. +1 −1 cruise.umple/test/cruise/umple/implementation/ruby/ManyToMNTest_Many.ruby.txt
  17. +1 −1 cruise.umple/test/cruise/umple/implementation/ruby/ManyToMStarTest_Many.ruby.txt
  18. +1 −1 cruise.umple/test/cruise/umple/implementation/ruby/ManyToNTest_Many.ruby.txt
  19. +1 −1 cruise.umple/test/cruise/umple/implementation/ruby/OneToMNTest_MN.ruby.txt
  20. +1 −1 cruise.umple/test/cruise/umple/implementation/ruby/OneToMandatoryManyTest_Many.ruby.txt
  21. +1 −1 cruise.umple/test/cruise/umple/implementation/ruby/OneToManyTest_Many.ruby.txt
  22. +1 −1 cruise.umple/test/cruise/umple/implementation/ruby/OneToNTest_N.ruby.txt
  23. +1 −1 cruise.umple/test/cruise/umple/implementation/ruby/OneToOptionalNTest_OptionalN.ruby.txt
  24. +1 −1 cruise.umple/test/cruise/umple/implementation/ruby/OneToOptionalOneTest_Subordinate.ruby.txt
  25. +1 −1 cruise.umple/test/cruise/umple/implementation/ruby/OptionalOneToMNTest_One.ruby.txt
  26. +1 −1 cruise.umple/test/cruise/umple/implementation/ruby/OptionalOneToMStarTest_One.ruby.txt
  27. +1 −1 cruise.umple/test/cruise/umple/implementation/ruby/OptionalOneToNTest_One.ruby.txt
  28. +1 −1 cruise.umple/test/cruise/umple/implementation/ruby/ReflexiveAssociationTest_OneToMany.ruby.txt
  29. +1 −1 cruise.umple/test/cruise/umple/implementation/ruby/UnidirectionalMNTest_Aware.ruby.txt
  30. +1 −1 cruise.umple/test/cruise/umple/implementation/ruby/UnidirectionalMStarTest_Aware.ruby.txt
  31. +1 −1 cruise.umple/test/cruise/umple/implementation/ruby/UnidirectionalNTest_Aware.ruby.txt
  32. +1 −1 cruise.umple/test/cruise/umple/implementation/ruby/UnidirectionalOneTest_Aware.ruby.txt
@@ -2,5 +2,5 @@ class UmpleToRuby {
constructor_AssociationAssignImmutableOptionalMany <<!<</*constructor_AssociationAssignImmutableOptionalMany*/>>
@<<=gen.translate("associationMany",av)>> = []
<<=gen.translate("didAddMany",av)>> = <<=gen.translate("setManyMethod",av)>>(<<=gen.translate("parameterAll",av)>>)
raise "Unable to create <<=gen.relatedTranslate("type",av)>>, must not have duplicate @<<=gen.translate("associationMany",av)>>" unless <<=gen.translate("didAddMany",av)>>!>>
raise "Unable to create <<=gen.relatedTranslate("type",av)>>, must not have duplicate @<<=gen.translate("associationMany",av)>>. See http://manual.umple.org?RE001ViolationofImmutability.html" unless <<=gen.translate("didAddMany",av)>>!>>
}
@@ -2,5 +2,5 @@ class UmpleToRuby {
constructor_AssociationAssignImmutableOptionalN <<!<</*constructor_AssociationAssignImmutableOptionalN*/>><<# String requiredNumber = "" + av.getMultiplicity().getUpperBound(); #>>
@<<=gen.translate("associationMany",av)>> = []
<<=gen.translate("didAddMany",av)>> = <<=gen.translate("setManyMethod",av)>>(<<=gen.translate("parameterAll",av)>>)
raise "Unable to create <<=gen.relatedTranslate("type",av)>>, must have <<=requiredNumber>> or fewer @<<=gen.translate("associationMany",av)>>, no duplicates" unless <<=gen.translate("didAddMany",av)>>!>>
raise "Unable to create <<=gen.relatedTranslate("type",av)>>, must have <<=requiredNumber>> or fewer @<<=gen.translate("associationMany",av)>>, no duplicates. See http://manual.umple.org?RE001ViolationofImmutability.html" unless <<=gen.translate("didAddMany",av)>>!>>
}
@@ -17,5 +17,5 @@ class UmpleToRuby {
#>>
@<<=gen.translate("associationMany",av)>> = []
<<=gen.translate("didAddMany",av)>> = <<=gen.translate("setManyMethod",av)>>(<<=gen.translate("parameterAll",av)>>)
raise "Unable to create <<=gen.relatedTranslate("type",av)>>, must have <<=requiredNumber>> @<<=gen.translate("associationMany",av)>>" unless <<=gen.translate("didAddMany",av)>>!>>
}
raise "Unable to create <<=gen.relatedTranslate("type",av)>>, must have <<=requiredNumber>> @<<=gen.translate("associationMany",av)>>. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html" unless <<=gen.translate("didAddMany",av)>>!>>
}
@@ -2,5 +2,5 @@ class UmpleToRuby {
constructor_AssociationAssignOne <<!<</*constructor_AssociationAssignOne*/>>
@<<=gen.translate("associationOne",av)>> = nil
<<=gen.translate("didAdd",av)>> = <<=gen.translate("setMethod",av)>>(<<=gen.translate("parameterOne",av)>>)
raise "Unable to create <<=gen.relatedTranslate("associationOne",av)>> due to @<<=gen.translate("associationOne",av)>>" unless <<=gen.translate("didAdd",av)>>!>>
raise "Unable to create <<=gen.relatedTranslate("associationOne",av)>> due to @<<=gen.translate("associationOne",av)>>. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html" unless <<=gen.translate("didAdd",av)>>!>>
}
@@ -1,6 +1,6 @@
class UmpleToRuby {
constructor_AssociationAssignUndirectionalOne <<!<</*constructor_AssociationAssignUndirectionalOne*/>>
unless <<=gen.translate("setMethod",av)>>(<<=gen.translate("parameterOne",av)>>)
raise "Unable to create <<=gen.relatedTranslate("type",av)>> due to <<=gen.translate("parameterOne",av)>>"
raise "Unable to create <<=gen.relatedTranslate("type",av)>> due to <<=gen.translate("parameterOne",av)>>. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"
end!>>
}
@@ -2,6 +2,6 @@ class UmpleToRuby {
constructor_AttributeAssignUnique <<!<</*constructor_AttributeAssignUnique*/>>
@<<=av.getName()>> = nil
if (!<<=gen.translate("setMethod", av)>>(<<=gen.translate("parameterOne", av)>>))
raise ArgumentError, 'Cannot create due to duplicate <<=av.getName()>>'
raise ArgumentError, 'Cannot create due to duplicate <<=av.getName()>>. See http://manual.umple.org?RE003ViolationofUniqueness.html'
end!>>
}
@@ -62,7 +62,7 @@ class Mentor
@@next_x += 1
@id = nil
if (!set_id(a_id))
raise ArgumentError, 'Cannot create due to duplicate id'
raise ArgumentError, 'Cannot create due to duplicate id. See http://manual.umple.org?RE003ViolationofUniqueness.html'
end
@initialized = true
end
@@ -28,7 +28,7 @@ class Student
@number = a_number
@mentors = []
did_add_mentors = set_mentors(all_mentors)
raise "Unable to create Student, must have at least 1 @mentors" unless did_add_mentors
raise "Unable to create Student, must have at least 1 @mentors. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html" unless did_add_mentors
@courses = []
@initialized = true
end
@@ -25,16 +25,16 @@ class Student
@m1 = nil
@m2 = nil
did_add_m2 = set_m2(a_m2)
raise "Unable to create two due to @m2" unless did_add_m2
raise "Unable to create two due to @m2. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html" unless did_add_m2
@m3s = []
did_add_m3s = set_m3s(all_m3s)
raise "Unable to create Student, must have 1 to 3 @m3s" unless did_add_m3s
raise "Unable to create Student, must have 1 to 3 @m3s. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html" unless did_add_m3s
@m4s = []
did_add_m4s = set_m4s(all_m4s)
raise "Unable to create Student, must have 4 to 7 @m4s" unless did_add_m4s
raise "Unable to create Student, must have 4 to 7 @m4s. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html" unless did_add_m4s
@m5s = []
did_add_m5s = set_m5s(all_m5s)
raise "Unable to create Student, must have at least 2 @m5s" unless did_add_m5s
raise "Unable to create Student, must have at least 2 @m5s. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html" unless did_add_m5s
@m6s = []
@initialized = true
end
@@ -30,7 +30,7 @@ class Student
@can_set_mentors = true
@mentors = []
did_add_mentors = set_mentors(all_mentors)
raise "Unable to create Student, must have 2 to 4 @mentors" unless did_add_mentors
raise "Unable to create Student, must have 2 to 4 @mentors. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html" unless did_add_mentors
@initialized = true
end

@@ -30,7 +30,7 @@ class Student
@can_set_mentors = true
@mentors = []
did_add_mentors = set_mentors(all_mentors)
raise "Unable to create Student, must have at least 1 @mentors" unless did_add_mentors
raise "Unable to create Student, must have at least 1 @mentors. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html" unless did_add_mentors
@initialized = true
end

@@ -30,7 +30,7 @@ class Student
@can_set_mentors = true
@mentors = []
did_add_mentors = set_mentors(all_mentors)
raise "Unable to create Student, must not have duplicate @mentors" unless did_add_mentors
raise "Unable to create Student, must not have duplicate @mentors. See http://manual.umple.org?RE001ViolationofImmutability.html" unless did_add_mentors
@initialized = true
end

@@ -30,7 +30,7 @@ class Student
@can_set_mentors = true
@mentors = []
did_add_mentors = set_mentors(all_mentors)
raise "Unable to create Student, must have 3 @mentors" unless did_add_mentors
raise "Unable to create Student, must have 3 @mentors. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html" unless did_add_mentors
@initialized = true
end

@@ -29,7 +29,7 @@ class Student
@can_set_number = false
@can_set_mentor = true
unless set_mentor(a_mentor)
raise "Unable to create Student due to a_mentor"
raise "Unable to create Student due to a_mentor. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"
end
@initialized = true
end
@@ -30,7 +30,7 @@ class Student
@can_set_mentors = true
@mentors = []
did_add_mentors = set_mentors(all_mentors)
raise "Unable to create Student, must have 3 or fewer @mentors, no duplicates" unless did_add_mentors
raise "Unable to create Student, must have 3 or fewer @mentors, no duplicates. See http://manual.umple.org?RE001ViolationofImmutability.html" unless did_add_mentors
@initialized = true
end

@@ -28,7 +28,7 @@ class Mentor
@name = a_name
@students = []
did_add_students = set_students(all_students)
raise "Unable to create Mentor, must have 3 to 4 @students" unless did_add_students
raise "Unable to create Mentor, must have 3 to 4 @students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html" unless did_add_students
@initialized = true
end

@@ -28,7 +28,7 @@ class Mentor
@name = a_name
@students = []
did_add_students = set_students(all_students)
raise "Unable to create Mentor, must have at least 4 @students" unless did_add_students
raise "Unable to create Mentor, must have at least 4 @students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html" unless did_add_students
@initialized = true
end

@@ -28,7 +28,7 @@ class Mentor
@name = a_name
@students = []
did_add_students = set_students(all_students)
raise "Unable to create Mentor, must have 2 @students" unless did_add_students
raise "Unable to create Mentor, must have 2 @students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html" unless did_add_students
@initialized = true
end

@@ -28,7 +28,7 @@ class Pupil
@number = a_number
@mentor = nil
did_add_mentor = set_mentor(a_mentor)
raise "Unable to create pupil due to @mentor" unless did_add_mentor
raise "Unable to create pupil due to @mentor. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html" unless did_add_mentor
@initialized = true
end

@@ -28,7 +28,7 @@ class Student
@number = a_number
@mentor = nil
did_add_mentor = set_mentor(a_mentor)
raise "Unable to create student due to @mentor" unless did_add_mentor
raise "Unable to create student due to @mentor. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html" unless did_add_mentor
@initialized = true
end

@@ -28,7 +28,7 @@ class Student
@number = a_number
@mentor = nil
did_add_mentor = set_mentor(a_mentor)
raise "Unable to create student due to @mentor" unless did_add_mentor
raise "Unable to create student due to @mentor. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html" unless did_add_mentor
@initialized = true
end

@@ -28,7 +28,7 @@ class Student
@number = a_number
@mentor = nil
did_add_mentor = set_mentor(a_mentor)
raise "Unable to create student due to @mentor" unless did_add_mentor
raise "Unable to create student due to @mentor. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html" unless did_add_mentor
@initialized = true
end

@@ -28,7 +28,7 @@ class Student
@number = a_number
@mentor = nil
did_add_mentor = set_mentor(a_mentor)
raise "Unable to create student due to @mentor" unless did_add_mentor
raise "Unable to create student due to @mentor. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html" unless did_add_mentor
@initialized = true
end

@@ -28,7 +28,7 @@ class MySubordinate
@number = a_number
@myDriver = nil
did_add_myDriver = set_myDriver(a_myDriver)
raise "Unable to create mySubordinate due to @myDriver" unless did_add_myDriver
raise "Unable to create mySubordinate due to @myDriver. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html" unless did_add_myDriver
@initialized = true
end

@@ -28,7 +28,7 @@ class Mentor
@name = a_name
@students = []
did_add_students = set_students(all_students)
raise "Unable to create Mentor, must have 3 to 4 @students" unless did_add_students
raise "Unable to create Mentor, must have 3 to 4 @students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html" unless did_add_students
@initialized = true
end

@@ -28,7 +28,7 @@ class Mentor
@name = a_name
@students = []
did_add_students = set_students(all_students)
raise "Unable to create Mentor, must have at least 5 @students" unless did_add_students
raise "Unable to create Mentor, must have at least 5 @students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html" unless did_add_students
@initialized = true
end

@@ -28,7 +28,7 @@ class Mentor
@name = a_name
@students = []
did_add_students = set_students(all_students)
raise "Unable to create Mentor, must have 3 @students" unless did_add_students
raise "Unable to create Mentor, must have 3 @students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html" unless did_add_students
@initialized = true
end

@@ -23,7 +23,7 @@ class OneToMany
@initialized = false
@deleted = false
unless set_oneToMany(a_oneToMany)
raise "Unable to create OneToMany due to a_oneToMany"
raise "Unable to create OneToMany due to a_oneToMany. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"
end
@initialized = true
end
@@ -28,7 +28,7 @@ class Mentor
@name = a_name
@students = []
did_add_students = set_students(all_students)
raise "Unable to create Mentor, must have 3 to 7 @students" unless did_add_students
raise "Unable to create Mentor, must have 3 to 7 @students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html" unless did_add_students
@initialized = true
end

@@ -28,7 +28,7 @@ class Mentor
@name = a_name
@students = []
did_add_students = set_students(all_students)
raise "Unable to create Mentor, must have at least 1 @students" unless did_add_students
raise "Unable to create Mentor, must have at least 1 @students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html" unless did_add_students
@initialized = true
end

@@ -28,7 +28,7 @@ class Mentor
@name = a_name
@students = []
did_add_students = set_students(all_students)
raise "Unable to create Mentor, must have 4 @students" unless did_add_students
raise "Unable to create Mentor, must have 4 @students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html" unless did_add_students
@initialized = true
end

@@ -27,7 +27,7 @@ class Mentor
@deleted = false
@name = a_name
unless set_student(a_student)
raise "Unable to create Mentor due to a_student"
raise "Unable to create Mentor due to a_student. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"
end
@initialized = true
end

0 comments on commit 0e37c84

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