diff options
Diffstat (limited to 'tests')
140 files changed, 6148 insertions, 9 deletions
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/.classpath b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/.classpath new file mode 100644 index 00000000000..3e5654f17eb --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/.classpath @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"> + <attributes> + <attribute name="test" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/.project b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/.project new file mode 100644 index 00000000000..d767ff38b4d --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.papyrus.uml.diagram.properties.tests</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/.settings/org.eclipse.core.resources.prefs b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000000..896a9a53a53 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/<project>=UTF-8
\ No newline at end of file diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/.settings/org.eclipse.core.runtime.prefs b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/.settings/org.eclipse.core.runtime.prefs new file mode 100644 index 00000000000..5a0ad22d2a7 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/.settings/org.eclipse.core.runtime.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +line.separator=\n diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..5a8cd60f98e --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,311 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.line_length=260 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=false +org.eclipse.jdt.core.formatter.join_wrapped_lines=false +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=260 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true +org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true +org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true +org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/.settings/org.eclipse.jdt.ui.prefs b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000000..3f09e0ff2ae --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,68 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=false +cleanup.format_source_code=false +cleanup.format_source_code_changes_only=false +cleanup.insert_inferred_type_arguments=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=false +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_anonymous_class_creation=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=false +cleanup.use_this_for_non_static_field_access=false +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=false +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup.use_type_arguments=false +cleanup_profile=_Papyrus +cleanup_settings_version=2 +eclipse.preferences.version=1 +formatter_profile=_Papyrus +formatter_settings_version=12 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..bb4a94c7854 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/META-INF/MANIFEST.MF @@ -0,0 +1,22 @@ +Manifest-Version: 1.0 +Require-Bundle: org.junit;bundle-version="4.10.0";visibility:=reexport, + org.eclipse.papyrus.junit.framework;bundle-version="[1.2.0,2.0.0)";visibility:=reexport, + org.eclipse.papyrus.junit.utils;bundle-version="[2.0.0,3.0.0)", + org.eclipse.papyrus.uml.properties;bundle-version="[3.1.100,4.0.0)", + org.eclipse.papyrus.infra.properties.ui;bundle-version="[3.3.0,4.0.0)", + org.eclipse.papyrus.uml.tools;bundle-version="[4.1.0,5.0.0)", + org.eclipse.papyrus.uml.properties.tests;bundle-version="[1.0.0,2.0.0)", + org.eclipse.papyrus.infra.gmfdiag.properties;bundle-version="[4.0.0,5.0.0)", + org.eclipse.papyrus.uml.diagram.activity;bundle-version="[3.5.0,4.0.0)", + org.eclipse.papyrus.uml.diagram.sequence;bundle-version="[5.2.0,6.0.0)", + org.eclipse.papyrus.infra.internationalization.utils;bundle-version="[1.0.100,2.0.0)" +Export-Package: org.eclipse.papyrus.uml.diagram.properties.databinding.tests, + org.eclipse.papyrus.uml.diagram.properties.tests +Bundle-Vendor: %providerName +Bundle-Version: 1.0.0.qualifier +Bundle-Name: %pluginName +Bundle-Localization: plugin +Bundle-ManifestVersion: 2 +Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.properties.tests;singleton:=true +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Automatic-Module-Name: org.eclipse.papyrus.uml.diagram.properties.tests diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/about.html b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/about.html new file mode 100644 index 00000000000..997c5a2284d --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/about.html @@ -0,0 +1,28 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<title>About</title> +</head> +<body lang="EN-US"> +<h2>About This Content</h2> + +<p>November 30, 2017</p> +<h3>License</h3> + +<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available +at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>. +For purposes of the EPL, "Program" will mean the Content.</p> + +<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p> + +</body> +</html> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/build.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/build.properties new file mode 100644 index 00000000000..cdd2db7f1f5 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/build.properties @@ -0,0 +1,7 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + about.html,\ + plugin.properties +src.includes = about.html diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/CanonicalObservableValue.di b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/CanonicalObservableValue.di new file mode 100644 index 00000000000..8c549eecdc6 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/CanonicalObservableValue.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/CanonicalObservableValue.notation b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/CanonicalObservableValue.notation new file mode 100644 index 00000000000..844ef6821f2 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/CanonicalObservableValue.notation @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/gmfdiag/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_1J2EEKonEemdRud3bBEWMw" type="PapyrusUMLClassDiagram" name="ClassDiagram" measurementUnit="Pixel"> + <children xmi:type="notation:Shape" xmi:id="_2v9GQKonEemdRud3bBEWMw" type="Class_Shape"> + <children xmi:type="notation:DecorationNode" xmi:id="_2v9GQqonEemdRud3bBEWMw" type="Class_NameLabel"/> + <children xmi:type="notation:DecorationNode" xmi:id="_2v9GQ6onEemdRud3bBEWMw" type="Class_FloatingNameLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_2v9GRKonEemdRud3bBEWMw" y="15"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_2v9tUKonEemdRud3bBEWMw" type="Class_AttributeCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_2v9tUaonEemdRud3bBEWMw"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_2v9tUqonEemdRud3bBEWMw"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_2v9tU6onEemdRud3bBEWMw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2v9tVKonEemdRud3bBEWMw"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_2v9tVaonEemdRud3bBEWMw" type="Class_OperationCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_2v9tVqonEemdRud3bBEWMw"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_2v9tV6onEemdRud3bBEWMw"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_2v9tWKonEemdRud3bBEWMw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2v9tWaonEemdRud3bBEWMw"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_2v9tWqonEemdRud3bBEWMw" type="Class_NestedClassifierCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_2v9tW6onEemdRud3bBEWMw"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_2v9tXKonEemdRud3bBEWMw"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_2v9tXaonEemdRud3bBEWMw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2v9tXqonEemdRud3bBEWMw"/> + </children> + <element xmi:type="uml:Class" href="CanonicalObservableValue.uml#_2v6C8KonEemdRud3bBEWMw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2v9GQaonEemdRud3bBEWMw" x="240" y="120"/> + </children> + <styles xmi:type="notation:StringValueStyle" xmi:id="_1J2EEaonEemdRud3bBEWMw" name="diagram_compatibility_version" stringValue="1.4.0"/> + <styles xmi:type="notation:DiagramStyle" xmi:id="_1J2EEqonEemdRud3bBEWMw"/> + <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_1J2EE6onEemdRud3bBEWMw" diagramKindId="org.eclipse.papyrus.uml.diagram.class"> + <owner xmi:type="uml:Model" href="CanonicalObservableValue.uml#_1JxyoKonEemdRud3bBEWMw"/> + </styles> + <element xmi:type="uml:Model" href="CanonicalObservableValue.uml#_1JxyoKonEemdRud3bBEWMw"/> +</notation:Diagram> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/CanonicalObservableValue.uml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/CanonicalObservableValue.uml new file mode 100644 index 00000000000..ff62811f867 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/CanonicalObservableValue.uml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_1JxyoKonEemdRud3bBEWMw" name="CanonicalObservableValue"> + <packageImport xmi:type="uml:PackageImport" xmi:id="_1N9IAKonEemdRud3bBEWMw"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> + <packagedElement xmi:type="uml:Class" xmi:id="_2v6C8KonEemdRud3bBEWMw" name="Class1"/> +</uml:Model> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/ConnectionDecorationStyleObservableValue.di b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/ConnectionDecorationStyleObservableValue.di new file mode 100644 index 00000000000..8c549eecdc6 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/ConnectionDecorationStyleObservableValue.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/ConnectionDecorationStyleObservableValue.notation b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/ConnectionDecorationStyleObservableValue.notation new file mode 100644 index 00000000000..b03d1111f52 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/ConnectionDecorationStyleObservableValue.notation @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8"?> +<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/gmfdiag/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_MMGFcKotEemdRud3bBEWMw" type="CompositeStructure" name="CompositeStructureDiagram" measurementUnit="Pixel"> + <children xmi:type="notation:Shape" xmi:id="_NoIloKotEemdRud3bBEWMw" type="Interaction_Shape"> + <children xmi:type="notation:DecorationNode" xmi:id="_NoJMsKotEemdRud3bBEWMw" type="Interaction_NameLabel"/> + <children xmi:type="notation:DecorationNode" xmi:id="_NoJMsaotEemdRud3bBEWMw" type="Interaction_FloatingNameLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_NoJMsqotEemdRud3bBEWMw" y="15"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_NoJMs6otEemdRud3bBEWMw" type="Interaction_StructureCompartment"> + <children xmi:type="notation:Shape" xmi:id="_N-44wKotEemdRud3bBEWMw" type="Interaction_Shape_CN"> + <children xmi:type="notation:DecorationNode" xmi:id="_N-5f0KotEemdRud3bBEWMw" type="Interaction_NameLabel_CN"/> + <children xmi:type="notation:DecorationNode" xmi:id="_N-5f0aotEemdRud3bBEWMw" type="Interaction_FloatingNameLabel_CN"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_N-5f0qotEemdRud3bBEWMw" y="15"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_N-5f06otEemdRud3bBEWMw" type="Interaction_StructureCompartment_CN"> + <styles xmi:type="notation:TitleStyle" xmi:id="_N-5f1KotEemdRud3bBEWMw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N-5f1aotEemdRud3bBEWMw"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_N_O3AKotEemdRud3bBEWMw" type="compartment_shape_display"> + <styles xmi:type="notation:TitleStyle" xmi:id="_N_O3AaotEemdRud3bBEWMw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N_O3AqotEemdRud3bBEWMw"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_PTf7QKotEemdRud3bBEWMw" type="Port_Shape"> + <children xmi:type="notation:DecorationNode" xmi:id="_PTf7QqotEemdRud3bBEWMw" type="Port_NameLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_PTf7Q6otEemdRud3bBEWMw" x="-131" y="-29"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_PTgiUKotEemdRud3bBEWMw" type="Port_StereotypeLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_PTgiUaotEemdRud3bBEWMw" x="25" y="-10"/> + </children> + <element xmi:type="uml:Port" href="ConnectionDecorationStyleObservableValue.uml#_PTbCwKotEemdRud3bBEWMw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PTf7QaotEemdRud3bBEWMw" x="231" y="9"/> + </children> + <element xmi:type="uml:Interaction" href="ConnectionDecorationStyleObservableValue.uml#_N-0AQKotEemdRud3bBEWMw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N-44waotEemdRud3bBEWMw" x="74" y="38" width="241" height="81"/> + </children> + <styles xmi:type="notation:TitleStyle" xmi:id="_NoJMtKotEemdRud3bBEWMw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NoJMtaotEemdRud3bBEWMw"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_NoOFMKotEemdRud3bBEWMw" type="compartment_shape_display"> + <styles xmi:type="notation:TitleStyle" xmi:id="_NoOFMaotEemdRud3bBEWMw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NoOFMqotEemdRud3bBEWMw"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_OStzsKotEemdRud3bBEWMw" type="Port_Shape"> + <children xmi:type="notation:DecorationNode" xmi:id="_OSuawKotEemdRud3bBEWMw" type="Port_NameLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_OSuawaotEemdRud3bBEWMw" x="25" y="3"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_OSuawqotEemdRud3bBEWMw" type="Port_StereotypeLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_OSuaw6otEemdRud3bBEWMw" x="25" y="-10"/> + </children> + <element xmi:type="uml:Port" href="ConnectionDecorationStyleObservableValue.uml#_OSoUIKotEemdRud3bBEWMw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OStzsaotEemdRud3bBEWMw" x="411" y="100"/> + </children> + <element xmi:type="uml:Interaction" href="ConnectionDecorationStyleObservableValue.uml#_Nn-0oKotEemdRud3bBEWMw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NoIloaotEemdRud3bBEWMw" x="140" y="160" width="421" height="241"/> + </children> + <styles xmi:type="notation:StringValueStyle" xmi:id="_MMGFcaotEemdRud3bBEWMw" name="diagram_compatibility_version" stringValue="1.4.0"/> + <styles xmi:type="notation:DiagramStyle" xmi:id="_MMGFcqotEemdRud3bBEWMw"/> + <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_MMGFc6otEemdRud3bBEWMw" diagramKindId="org.eclipse.papyrus.uml.diagram.compositeStructure.root.package"> + <owner xmi:type="uml:Model" href="ConnectionDecorationStyleObservableValue.uml#_o2acMKoqEemdRud3bBEWMw"/> + </styles> + <element xmi:type="uml:Model" href="ConnectionDecorationStyleObservableValue.uml#_o2acMKoqEemdRud3bBEWMw"/> + <edges xmi:type="notation:Connector" xmi:id="_QwKtkKotEemdRud3bBEWMw" type="Connector_Edge" source="_PTf7QKotEemdRud3bBEWMw" target="_OStzsKotEemdRud3bBEWMw"> + <children xmi:type="notation:DecorationNode" xmi:id="_QwLUoKotEemdRud3bBEWMw" type="Connector_StereotypeLabel"> + <styles xmi:type="notation:BooleanValueStyle" xmi:id="_RFZWsKotEemdRud3bBEWMw" name="IS_UPDATED_POSITION" booleanValue="true"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_QwLUoaotEemdRud3bBEWMw" y="59"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_QwLUoqotEemdRud3bBEWMw" type="Connector_NameLabel"> + <styles xmi:type="notation:BooleanValueStyle" xmi:id="_RFh5kKotEemdRud3bBEWMw" name="IS_UPDATED_POSITION" booleanValue="true"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_QwLUo6otEemdRud3bBEWMw" x="-2" y="-16"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_QwLUpKotEemdRud3bBEWMw" type="Connector_SourceMultiplicityLabel"> + <styles xmi:type="notation:BooleanValueStyle" xmi:id="_RFrqkKotEemdRud3bBEWMw" name="IS_UPDATED_POSITION" booleanValue="true"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_QwLUpaotEemdRud3bBEWMw" x="-48" y="20"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_QwLUpqotEemdRud3bBEWMw" type="Connector_TargetMultiplicityLabel"> + <styles xmi:type="notation:BooleanValueStyle" xmi:id="_RF2psKotEemdRud3bBEWMw" name="IS_UPDATED_POSITION" booleanValue="true"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_QwLUp6otEemdRud3bBEWMw" x="48" y="18"/> + </children> + <styles xmi:type="notation:FontStyle" xmi:id="_QwKtkaotEemdRud3bBEWMw"/> + <element xmi:type="uml:Connector" href="ConnectionDecorationStyleObservableValue.uml#_QwBjoKotEemdRud3bBEWMw"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_QwKtkqotEemdRud3bBEWMw" points="[230, 247, -643984, -643984]$[560, 260, -643984, -643984]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_RFQMwKotEemdRud3bBEWMw" id="(0.5,0.5)"/> + </edges> +</notation:Diagram> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/ConnectionDecorationStyleObservableValue.uml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/ConnectionDecorationStyleObservableValue.uml new file mode 100644 index 00000000000..a8826f38981 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/ConnectionDecorationStyleObservableValue.uml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_o2acMKoqEemdRud3bBEWMw" name="ConnectionDecorationStyleObservableValue"> + <packageImport xmi:type="uml:PackageImport" xmi:id="_o61CIKoqEemdRud3bBEWMw"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> + <packagedElement xmi:type="uml:Interaction" xmi:id="_Nn-0oKotEemdRud3bBEWMw" name="Interaction2"> + <ownedAttribute xmi:type="uml:Port" xmi:id="_OSoUIKotEemdRud3bBEWMw" name="Port2" aggregation="composite"/> + <ownedConnector xmi:type="uml:Connector" xmi:id="_QwBjoKotEemdRud3bBEWMw" name="Connector1"> + <end xmi:type="uml:ConnectorEnd" xmi:id="_QwFOAKotEemdRud3bBEWMw" role="_PTbCwKotEemdRud3bBEWMw"/> + <end xmi:type="uml:ConnectorEnd" xmi:id="_QwF1EKotEemdRud3bBEWMw" role="_OSoUIKotEemdRud3bBEWMw"/> + </ownedConnector> + <ownedBehavior xmi:type="uml:Interaction" xmi:id="_N-0AQKotEemdRud3bBEWMw" name="Interaction1"> + <ownedAttribute xmi:type="uml:Port" xmi:id="_PTbCwKotEemdRud3bBEWMw" name="Port1" aggregation="composite"/> + </ownedBehavior> + </packagedElement> +</uml:Model> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/CustomStyleCompartmentObservableValue.di b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/CustomStyleCompartmentObservableValue.di new file mode 100644 index 00000000000..8c549eecdc6 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/CustomStyleCompartmentObservableValue.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/CustomStyleCompartmentObservableValue.notation b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/CustomStyleCompartmentObservableValue.notation new file mode 100644 index 00000000000..e70c18d6ded --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/CustomStyleCompartmentObservableValue.notation @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/gmfdiag/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_V4VH8KoyEemdRud3bBEWMw" type="PapyrusUMLClassDiagram" name="ClassDiagram" measurementUnit="Pixel"> + <children xmi:type="notation:Shape" xmi:id="_X0boQKoyEemdRud3bBEWMw" type="Class_Shape"> + <children xmi:type="notation:DecorationNode" xmi:id="_X0boQqoyEemdRud3bBEWMw" type="Class_NameLabel"/> + <children xmi:type="notation:DecorationNode" xmi:id="_X0cPUKoyEemdRud3bBEWMw" type="Class_FloatingNameLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_X0cPUaoyEemdRud3bBEWMw" y="15"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_X0cPUqoyEemdRud3bBEWMw" type="Class_AttributeCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_X0cPU6oyEemdRud3bBEWMw"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_X0cPVKoyEemdRud3bBEWMw"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_X0cPVaoyEemdRud3bBEWMw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_X0cPVqoyEemdRud3bBEWMw"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_X0cPV6oyEemdRud3bBEWMw" type="Class_OperationCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_X0cPWKoyEemdRud3bBEWMw"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_X0cPWaoyEemdRud3bBEWMw"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_X0cPWqoyEemdRud3bBEWMw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_X0cPW6oyEemdRud3bBEWMw"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_X0cPXKoyEemdRud3bBEWMw" type="Class_NestedClassifierCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_X0cPXaoyEemdRud3bBEWMw"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_X0cPXqoyEemdRud3bBEWMw"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_X0cPX6oyEemdRud3bBEWMw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_X0cPYKoyEemdRud3bBEWMw"/> + </children> + <element xmi:type="uml:Class" href="CustomStyleCompartmentObservableValue.uml#_X0ZMAKoyEemdRud3bBEWMw"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_X0boQaoyEemdRud3bBEWMw" x="182" y="200" width="96"/> + </children> + <styles xmi:type="notation:StringValueStyle" xmi:id="_V4VH8aoyEemdRud3bBEWMw" name="diagram_compatibility_version" stringValue="1.4.0"/> + <styles xmi:type="notation:DiagramStyle" xmi:id="_V4VH8qoyEemdRud3bBEWMw"/> + <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_V4VH86oyEemdRud3bBEWMw" diagramKindId="org.eclipse.papyrus.uml.diagram.class"> + <owner xmi:type="uml:Model" href="CustomStyleCompartmentObservableValue.uml#_V4Q2gKoyEemdRud3bBEWMw"/> + </styles> + <element xmi:type="uml:Model" href="CustomStyleCompartmentObservableValue.uml#_V4Q2gKoyEemdRud3bBEWMw"/> +</notation:Diagram> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/CustomStyleCompartmentObservableValue.uml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/CustomStyleCompartmentObservableValue.uml new file mode 100644 index 00000000000..aa786ddbbac --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/CustomStyleCompartmentObservableValue.uml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_V4Q2gKoyEemdRud3bBEWMw" name="CustomStringStyleCompartmentObservableValue"> + <packageImport xmi:type="uml:PackageImport" xmi:id="_V9y2wKoyEemdRud3bBEWMw"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> + <packagedElement xmi:type="uml:Class" xmi:id="_X0ZMAKoyEemdRud3bBEWMw" name="Class1"/> +</uml:Model> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/DiagramLabelObservableValue.di b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/DiagramLabelObservableValue.di new file mode 100644 index 00000000000..8c549eecdc6 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/DiagramLabelObservableValue.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/DiagramLabelObservableValue.notation b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/DiagramLabelObservableValue.notation new file mode 100644 index 00000000000..962be35e3fc --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/DiagramLabelObservableValue.notation @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/gmfdiag/style" xmi:id="_1qXRoKxgEem24bNaHB17pg" type="PapyrusUMLClassDiagram" name="ClassDiagram" measurementUnit="Pixel"> + <styles xsi:type="notation:StringValueStyle" xmi:id="_1qXRoaxgEem24bNaHB17pg" name="diagram_compatibility_version" stringValue="1.4.0"/> + <styles xsi:type="notation:DiagramStyle" xmi:id="_1qXRoqxgEem24bNaHB17pg"/> + <styles xsi:type="style:PapyrusDiagramStyle" xmi:id="_1qXRo6xgEem24bNaHB17pg" diagramKindId="org.eclipse.papyrus.uml.diagram.class"> + <owner href="DiagramLabelObservableValue.uml#_1qTAMKxgEem24bNaHB17pg"/> + </styles> + <element href="DiagramLabelObservableValue.uml#_1qTAMKxgEem24bNaHB17pg"/> +</notation:Diagram> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/DiagramLabelObservableValue.uml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/DiagramLabelObservableValue.uml new file mode 100644 index 00000000000..2edeb519e8b --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/DiagramLabelObservableValue.uml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_1qTAMKxgEem24bNaHB17pg" name="DiagramLabelObservableValue"> + <packageImport xmi:type="uml:PackageImport" xmi:id="_1u_S8KxgEem24bNaHB17pg"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> +</uml:Model> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/StyleWithStoreObservableValue.di b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/StyleWithStoreObservableValue.di new file mode 100644 index 00000000000..8c549eecdc6 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/StyleWithStoreObservableValue.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/StyleWithStoreObservableValue.notation b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/StyleWithStoreObservableValue.notation new file mode 100644 index 00000000000..784b7f0227e --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/StyleWithStoreObservableValue.notation @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/gmfdiag/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_HFA54Kx9Eem24bNaHB17pg" type="PapyrusUMLClassDiagram" name="ClassDiagram" measurementUnit="Pixel"> + <styles xmi:type="notation:StringValueStyle" xmi:id="_HFA54ax9Eem24bNaHB17pg" name="diagram_compatibility_version" stringValue="1.4.0"/> + <styles xmi:type="notation:DiagramStyle" xmi:id="_HFA54qx9Eem24bNaHB17pg"/> + <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_HFA546x9Eem24bNaHB17pg" diagramKindId="org.eclipse.papyrus.uml.diagram.class"> + <owner xmi:type="uml:Model" href="StyleWithStoreObservableValue.uml#_HE8ocKx9Eem24bNaHB17pg"/> + </styles> + <element xmi:type="uml:Model" href="StyleWithStoreObservableValue.uml#_HE8ocKx9Eem24bNaHB17pg"/> +</notation:Diagram> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/StyleWithStoreObservableValue.uml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/StyleWithStoreObservableValue.uml new file mode 100644 index 00000000000..89b61102cc0 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/StyleWithStoreObservableValue.uml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_HE8ocKx9Eem24bNaHB17pg" name="StyleObservableValue"> + <packageImport xmi:type="uml:PackageImport" xmi:id="_HJ3ksKx9Eem24bNaHB17pg"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> +</uml:Model> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/SwitchOrientationObservableValue.di b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/SwitchOrientationObservableValue.di new file mode 100644 index 00000000000..8c549eecdc6 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/SwitchOrientationObservableValue.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/SwitchOrientationObservableValue.notation b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/SwitchOrientationObservableValue.notation new file mode 100644 index 00000000000..a807ae48c89 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/SwitchOrientationObservableValue.notation @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> +<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/gmfdiag/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_oEGBsKyLEem24bNaHB17pg" type="PapyrusUMLActivityDiagram" name="ActivityDiagram" measurementUnit="Pixel"> + <children xmi:type="notation:Shape" xmi:id="_oEGBsayLEem24bNaHB17pg" type="Activity_Shape"> + <children xmi:type="notation:DecorationNode" xmi:id="_oEGBsqyLEem24bNaHB17pg" type="Activity_NameLabel"/> + <children xmi:type="notation:DecorationNode" xmi:id="_oEGBs6yLEem24bNaHB17pg" type="Activity_KeywordLabel"/> + <children xmi:type="notation:BasicCompartment" xmi:id="_oEGBtKyLEem24bNaHB17pg" type="Activity_ParameterCompartment"> + <styles xmi:type="notation:SortingStyle" xmi:id="_oEGBtayLEem24bNaHB17pg"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_oEGBtqyLEem24bNaHB17pg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_oEGBt6yLEem24bNaHB17pg"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_oEGBuKyLEem24bNaHB17pg" type="Activity_PreconditionCompartment"> + <styles xmi:type="notation:SortingStyle" xmi:id="_oEGBuayLEem24bNaHB17pg"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_oEGBuqyLEem24bNaHB17pg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_oEGBu6yLEem24bNaHB17pg"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_oEGBvKyLEem24bNaHB17pg" type="Activity_PostconditionCompartment"> + <styles xmi:type="notation:SortingStyle" xmi:id="_oEGBvayLEem24bNaHB17pg"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_oEGBvqyLEem24bNaHB17pg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_oEGBv6yLEem24bNaHB17pg"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_oEGBwKyLEem24bNaHB17pg" type="Activity_ActivityNodeCompartment"> + <children xmi:type="notation:Shape" xmi:id="_vvBtEKyLEem24bNaHB17pg" type="JoinNode_Shape"> + <children xmi:type="notation:DecorationNode" xmi:id="_vvCUIKyLEem24bNaHB17pg" type="JoinNode_FloatingNameLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_vvCUIayLEem24bNaHB17pg" y="15"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_vvCUIqyLEem24bNaHB17pg" type="JoinNode_JoinSpecLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_vvCUI6yLEem24bNaHB17pg" y="15"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_vvCUJKyLEem24bNaHB17pg" type="JoinNode_StereotypeLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_vvCUJayLEem24bNaHB17pg" y="15"/> + </children> + <element xmi:type="uml:JoinNode" href="SwitchOrientationObservableValue.uml#_vu-CsKyLEem24bNaHB17pg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_vvBtEayLEem24bNaHB17pg" x="175" y="88"/> + </children> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_oEGBwayLEem24bNaHB17pg"/> + </children> + <element xmi:type="uml:Activity" href="SwitchOrientationObservableValue.uml#_oEBJMKyLEem24bNaHB17pg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_oEGBwqyLEem24bNaHB17pg"/> + </children> + <styles xmi:type="notation:StringValueStyle" xmi:id="_oEGBw6yLEem24bNaHB17pg" name="diagram_compatibility_version" stringValue="1.4.0"/> + <styles xmi:type="notation:DiagramStyle" xmi:id="_oEGBxKyLEem24bNaHB17pg"/> + <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_oEGBxayLEem24bNaHB17pg" diagramKindId="org.eclipse.papyrus.uml.diagram.activity"> + <owner xmi:type="uml:Model" href="SwitchOrientationObservableValue.uml#_oD83wKyLEem24bNaHB17pg"/> + </styles> + <element xmi:type="uml:Activity" href="SwitchOrientationObservableValue.uml#_oEBJMKyLEem24bNaHB17pg"/> +</notation:Diagram> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/SwitchOrientationObservableValue.uml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/SwitchOrientationObservableValue.uml new file mode 100644 index 00000000000..28e72948c93 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/model/SwitchOrientationObservableValue.uml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_oD83wKyLEem24bNaHB17pg" name="SwitchOrientationObservableValue"> + <packageImport xmi:type="uml:PackageImport" xmi:id="_oJDaMKyLEem24bNaHB17pg"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> + <packagedElement xmi:type="uml:Activity" xmi:id="_oEBJMKyLEem24bNaHB17pg" name="Activity1" node="_vu-CsKyLEem24bNaHB17pg"> + <node xmi:type="uml:JoinNode" xmi:id="_vu-CsKyLEem24bNaHB17pg" name="JoinNode1"/> + </packagedElement> +</uml:Model> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/org.eclipse.papyrus.uml.diagram.properties.tests.launch b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/org.eclipse.papyrus.uml.diagram.properties.tests.launch new file mode 100644 index 00000000000..3c73289dbc6 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/org.eclipse.papyrus.uml.diagram.properties.tests.launch @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig"> +<booleanAttribute key="append.args" value="true"/> +<booleanAttribute key="askclear" value="false"/> +<booleanAttribute key="automaticAdd" value="true"/> +<booleanAttribute key="automaticValidate" value="false"/> +<stringAttribute key="bootstrap" value=""/> +<stringAttribute key="checked" value="[NONE]"/> +<booleanAttribute key="clearConfig" value="true"/> +<booleanAttribute key="clearws" value="true"/> +<booleanAttribute key="clearwslog" value="false"/> +<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/> +<booleanAttribute key="default" value="true"/> +<booleanAttribute key="includeOptional" value="true"/> +<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> +<listEntry value="/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/tests/AllTests.java"/> +</listAttribute> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> +<listEntry value="1"/> +</listAttribute> +<listAttribute key="org.eclipse.eclemma.core.SCOPE_IDS"> +<listEntry value="=org.eclipse.papyrus.infra.gmfdiag.properties/src"/> +<listEntry value="=org.eclipse.papyrus.uml.diagram.activity/custom-src"/> +<listEntry value="=org.eclipse.papyrus.infra.gmfdiag.common/src"/> +</listAttribute> +<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/> +<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/> +<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/> +<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/> +<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/> +<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> +<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.uml.diagram.properties.tests.AllTests"/> +<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/> +<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.uml.diagram.properties.tests"/> +<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/> +<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dhelp.lucene.tokenizer=standard -Xms768m -Xmx1200m"/> +<stringAttribute key="pde.version" value="3.3"/> +<stringAttribute key="product" value="org.eclipse.platform.ide"/> +<booleanAttribute key="run_in_ui_thread" value="true"/> +<booleanAttribute key="show_selected_only" value="false"/> +<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/> +<booleanAttribute key="tracing" value="false"/> +<booleanAttribute key="useCustomFeatures" value="false"/> +<booleanAttribute key="useDefaultConfig" value="true"/> +<booleanAttribute key="useDefaultConfigArea" value="false"/> +<booleanAttribute key="useProduct" value="true"/> +</launchConfiguration> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/plugin.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/plugin.properties new file mode 100644 index 00000000000..ce4ccb9faf2 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/plugin.properties @@ -0,0 +1,16 @@ +################################################################################# +# Copyright (c) 2019 CEA LIST and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and Implementation. +# +################################################################################## +pluginName=Papyrus UML Diagram Properties Tests +providerName=Eclipse Modeling Project diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/pom.xml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/pom.xml new file mode 100644 index 00000000000..e8025a9e7b7 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/pom.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.eclipse.papyrus.tests</groupId> + <artifactId>org.eclipse.papyrus.uml.diagram.tests.releng</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + <groupId>org.eclipse.papyrus.tests</groupId> + <artifactId>org.eclipse.papyrus.uml.diagram.properties.tests</artifactId> + <version>1.0.0-SNAPSHOT</version> + <packaging>eclipse-test-plugin</packaging> +</project> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/AbstractStyleWithStoreObservableValueTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/AbstractStyleWithStoreObservableValueTest.java new file mode 100644 index 00000000000..ca16c279a62 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/AbstractStyleWithStoreObservableValueTest.java @@ -0,0 +1,69 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.diagram.properties.databinding.tests; + +import static org.junit.Assert.assertNotNull; + +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.papyrus.infra.gmfdiag.common.Activator; +import org.eclipse.papyrus.infra.gmfdiag.properties.modelelement.RulerAndGridModelElement; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.junit.utils.DiagramUtils; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrus.uml.properties.databinding.tests.AbstractUMLObservableValueTest; + +/** + * This allows to manage abstract class to test the style with store observable value. + */ +@SuppressWarnings({ "nls" }) +@PluginResource("model/StyleWithStoreObservableValue.di") +public abstract class AbstractStyleWithStoreObservableValueTest extends AbstractUMLObservableValueTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#initializeContextObject() + */ + @Override + protected Object initializeContextObject() { + final Diagram diagram = DiagramUtils.getNotationDiagram(editorFixture.getModelSet(), "ClassDiagram"); + assertNotNull(diagram); + + return diagram; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#createModelElement(org.eclipse.emf.edit.domain.EditingDomain, org.eclipse.emf.ecore.EObject) + */ + @Override + protected ModelElement createModelElement(final EditingDomain domain, final Object source) { + return new RulerAndGridModelElement((Diagram) source, domain, null, Activator.getInstance().getPreferenceStore()); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableValueTest#testUndo() + */ + @Override + protected boolean testUndo() { + return false; + } + +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/CanonicalObservableValueTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/CanonicalObservableValueTest.java new file mode 100644 index 00000000000..02ef852e854 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/CanonicalObservableValueTest.java @@ -0,0 +1,154 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.diagram.properties.databinding.tests; + +import static org.junit.Assert.assertNotNull; + +import java.util.Iterator; + +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gef.EditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.properties.modelelement.SynchronizationModelElement; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.junit.utils.DiagramUtils; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableValueTest; +import org.junit.Assert; + +/** + * This allows to test the canonical observable value. + */ +@SuppressWarnings({ "nls" }) +@PluginResource("model/CanonicalObservableValue.di") +public class CanonicalObservableValueTest extends AbstractObservableValueTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#initializeContextObject() + */ + @Override + protected Object initializeContextObject() { + Diagram diagram = DiagramUtils.getNotationDiagram(editorFixture.getModelSet(), "ClassDiagram"); + assertNotNull(diagram); + + editorFixture.getPageManager().openPage(diagram); + editorFixture.flushDisplayEvents(); + + final View diagramView = getDiagramView(diagram, "Class1"); + Assert.assertNotNull("The diagram view for 'Class1' cannot be found", diagramView); + + final IGraphicalEditPart semanticEP = DiagramUtils.findEditPartforView(editorFixture.getEditor(), diagramView, IGraphicalEditPart.class); + Assert.assertNotNull("The edit part for 'Class1' cannot be found", semanticEP); + + return semanticEP; + } + + /** + * Get view of the semantic element. + * + * @param diagram + * The diagram where find the view. + * @param semanticElement + * The name of the semantic element. + * @return A corresponding view of the semantic element. + */ + private View getDiagramView(final Diagram diagram, final String semanticElement) { + View diagramView = DiagramUtils.findShape(diagram, semanticElement); + if (null == diagramView) { + diagramView = DiagramUtils.findEdge(diagram, semanticElement); + } + if (null == diagramView) { + Iterator<?> iterator = diagram.eAllContents(); + while (null == diagramView && iterator.hasNext()) { + final Object object = iterator.next(); + if (object instanceof View) { + diagramView = DiagramUtils.findShape((View) object, semanticElement); + if (null == diagramView) { + diagramView = DiagramUtils.findEdge((View) object, semanticElement); + } + } + } + } + + return diagramView; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#createModelElement(org.eclipse.emf.edit.domain.EditingDomain, org.eclipse.emf.ecore.EObject) + */ + @Override + protected ModelElement createModelElement(final EditingDomain domain, final Object source) { + return new SynchronizationModelElement((TransactionalEditingDomain) domain, (EditPart) source); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return "syncWithModel"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return false; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + return true; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + return true; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableValueTest#expectedValueType() + */ + @Override + protected Object expectedValueType() { + return Boolean.class; + } + +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/ConnectionDecorationStyleObservableValueTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/ConnectionDecorationStyleObservableValueTest.java new file mode 100644 index 00000000000..78829db1fd4 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/ConnectionDecorationStyleObservableValueTest.java @@ -0,0 +1,126 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.diagram.properties.databinding.tests; + +import static org.junit.Assert.assertNotNull; + +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.editpart.ConnectionEditPart; +import org.eclipse.papyrus.infra.gmfdiag.properties.modelelement.AdvanceStyleModelElement; +import org.eclipse.papyrus.infra.properties.contexts.ContextsFactory; +import org.eclipse.papyrus.infra.properties.contexts.DataContextElement; +import org.eclipse.papyrus.infra.properties.contexts.Property; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.junit.utils.DiagramUtils; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrus.uml.properties.databinding.tests.AbstractUMLObservableValueTest; +import org.eclipse.papyrus.uml.properties.tests.DiagramViewUtils; +import org.junit.Assert; + +/** + * This allows to test the connection decoration style observable value. + */ +@SuppressWarnings({ "nls" }) +@PluginResource("model/ConnectionDecorationStyleObservableValue.di") +public class ConnectionDecorationStyleObservableValueTest extends AbstractUMLObservableValueTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#initializeContextObject() + */ + @Override + protected Object initializeContextObject() { + Diagram diagram = DiagramUtils.getNotationDiagram(editorFixture.getModelSet(), "CompositeStructureDiagram"); + assertNotNull(diagram); + + editorFixture.getPageManager().openPage(diagram); + editorFixture.flushDisplayEvents(); + + final View connectorView = DiagramViewUtils.getDiagramView(diagram, "Connector1"); + Assert.assertNotNull("The diagram view for 'Connector1' cannot be found", connectorView); + + return connectorView; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#createModelElement(org.eclipse.emf.edit.domain.EditingDomain, org.eclipse.emf.ecore.EObject) + */ + @Override + protected ModelElement createModelElement(final EditingDomain domain, final Object source) { + final DataContextElement dataContext = ContextsFactory.eINSTANCE.createDataContextElement(); + final Property createdProperty = ContextsFactory.eINSTANCE.createProperty(); + createdProperty.setName(getPropertyPath()); + dataContext.getProperties().add(createdProperty); + return new AdvanceStyleModelElement((View) source, (TransactionalEditingDomain) domain, dataContext); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return ConnectionEditPart.TARGET_DECORATION; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return "default"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + return "Solid Diamond Filled"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + return "solid_diamond_filled"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableValueTest#expectedValueType() + */ + @Override + protected Object expectedValueType() { + return String.class; + } + +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/CustomBooleanStyleWithStoreObservableValueTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/CustomBooleanStyleWithStoreObservableValueTest.java new file mode 100644 index 00000000000..d02321bef4a --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/CustomBooleanStyleWithStoreObservableValueTest.java @@ -0,0 +1,74 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.diagram.properties.databinding.tests; + +/** + * This allows to test the custom boolean style with store observable value. + */ +@SuppressWarnings({ "nls" }) +public class CustomBooleanStyleWithStoreObservableValueTest extends AbstractStyleWithStoreObservableValueTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return "grid.isDisplayingGrid"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return false; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + return true; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + return true; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableValueTest#expectedValueType() + */ + @Override + protected Object expectedValueType() { + return Boolean.class; + } + +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/CustomDoubleStyleWithStoreObservableValueTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/CustomDoubleStyleWithStoreObservableValueTest.java new file mode 100644 index 00000000000..39571eba1ba --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/CustomDoubleStyleWithStoreObservableValueTest.java @@ -0,0 +1,76 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.diagram.properties.databinding.tests; + +import org.eclipse.emf.ecore.EcorePackage; + +/** + * This allows to test the custom double style with store observable value. + */ +@SuppressWarnings({ "nls" }) +public class CustomDoubleStyleWithStoreObservableValueTest extends AbstractStyleWithStoreObservableValueTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return "grid.spacing"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return 0.0; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + return 30.0; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + return 30.0; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableValueTest#expectedValueType() + */ + @Override + protected Object expectedValueType() { + return EcorePackage.eINSTANCE.getEFloat(); + } + +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/CustomIntStyleCompartmentObservableValueTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/CustomIntStyleCompartmentObservableValueTest.java new file mode 100644 index 00000000000..48f2c094ea1 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/CustomIntStyleCompartmentObservableValueTest.java @@ -0,0 +1,126 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.diagram.properties.databinding.tests; + +import static org.junit.Assert.assertNotNull; + +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.utils.NamedStyleProperties; +import org.eclipse.papyrus.infra.gmfdiag.properties.modelelement.AdvanceStyleModelElement; +import org.eclipse.papyrus.infra.properties.contexts.ContextsFactory; +import org.eclipse.papyrus.infra.properties.contexts.DataContextElement; +import org.eclipse.papyrus.infra.properties.contexts.Property; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.junit.utils.DiagramUtils; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrus.uml.properties.databinding.tests.AbstractUMLObservableValueTest; +import org.eclipse.papyrus.uml.properties.tests.DiagramViewUtils; +import org.junit.Assert; + +/** + * This allows to test the custom int style compartment observable value. + */ +@SuppressWarnings({ "nls" }) +@PluginResource("model/CustomStyleCompartmentObservableValue.di") +public class CustomIntStyleCompartmentObservableValueTest extends AbstractUMLObservableValueTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#initializeContextObject() + */ + @Override + protected Object initializeContextObject() { + Diagram diagram = DiagramUtils.getNotationDiagram(editorFixture.getModelSet(), "ClassDiagram"); + assertNotNull(diagram); + + editorFixture.getPageManager().openPage(diagram); + editorFixture.flushDisplayEvents(); + + final View classView = DiagramViewUtils.getDiagramView(diagram, "Class1"); + Assert.assertNotNull("The diagram view for 'Class1' cannot be found", classView); + + return classView; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#createModelElement(org.eclipse.emf.edit.domain.EditingDomain, org.eclipse.emf.ecore.EObject) + */ + @Override + protected ModelElement createModelElement(final EditingDomain domain, final Object source) { + final DataContextElement dataContext = ContextsFactory.eINSTANCE.createDataContextElement(); + final Property createdProperty = ContextsFactory.eINSTANCE.createProperty(); + createdProperty.setName(getPropertyPath()); + dataContext.getProperties().add(createdProperty); + return new AdvanceStyleModelElement((View) source, (TransactionalEditingDomain) domain, dataContext); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return NamedStyleProperties.LINE_LENGTH; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return -1; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + return 10; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + return 10; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableValueTest#expectedValueType() + */ + @Override + protected Object expectedValueType() { + return Integer.class; + } + +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/CustomIntStyleWithStoreObservableValueTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/CustomIntStyleWithStoreObservableValueTest.java new file mode 100644 index 00000000000..a5f75a67129 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/CustomIntStyleWithStoreObservableValueTest.java @@ -0,0 +1,74 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.diagram.properties.databinding.tests; + +/** + * This allows to test the custom int style with store observable value. + */ +@SuppressWarnings({ "nls" }) +public class CustomIntStyleWithStoreObservableValueTest extends AbstractStyleWithStoreObservableValueTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return "grid.color"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return 0; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + return 2; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + return 2; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableValueTest#expectedValueType() + */ + @Override + protected Object expectedValueType() { + return Integer.class; + } + +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/CustomStringStyleCompartmentObservableValueTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/CustomStringStyleCompartmentObservableValueTest.java new file mode 100644 index 00000000000..e4410ec735e --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/CustomStringStyleCompartmentObservableValueTest.java @@ -0,0 +1,126 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.diagram.properties.databinding.tests; + +import static org.junit.Assert.assertNotNull; + +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.utils.NamedStyleProperties; +import org.eclipse.papyrus.infra.gmfdiag.properties.modelelement.AdvanceStyleModelElement; +import org.eclipse.papyrus.infra.properties.contexts.ContextsFactory; +import org.eclipse.papyrus.infra.properties.contexts.DataContextElement; +import org.eclipse.papyrus.infra.properties.contexts.Property; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.junit.utils.DiagramUtils; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrus.uml.properties.databinding.tests.AbstractUMLObservableValueTest; +import org.eclipse.papyrus.uml.properties.tests.DiagramViewUtils; +import org.junit.Assert; + +/** + * This allows to test the custom string style compartment observable value. + */ +@SuppressWarnings({ "nls" }) +@PluginResource("model/CustomStyleCompartmentObservableValue.di") +public class CustomStringStyleCompartmentObservableValueTest extends AbstractUMLObservableValueTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#initializeContextObject() + */ + @Override + protected Object initializeContextObject() { + Diagram diagram = DiagramUtils.getNotationDiagram(editorFixture.getModelSet(), "ClassDiagram"); + assertNotNull(diagram); + + editorFixture.getPageManager().openPage(diagram); + editorFixture.flushDisplayEvents(); + + final View classView = DiagramViewUtils.getDiagramView(diagram, "Class1"); + Assert.assertNotNull("The diagram view for 'Class1' cannot be found", classView); + + return classView; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#createModelElement(org.eclipse.emf.edit.domain.EditingDomain, org.eclipse.emf.ecore.EObject) + */ + @Override + protected ModelElement createModelElement(final EditingDomain domain, final Object source) { + final DataContextElement dataContext = ContextsFactory.eINSTANCE.createDataContextElement(); + final Property createdProperty = ContextsFactory.eINSTANCE.createProperty(); + createdProperty.setName(getPropertyPath()); + dataContext.getProperties().add(createdProperty); + return new AdvanceStyleModelElement((View) source, (TransactionalEditingDomain) domain, dataContext); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return NamedStyleProperties.LINE_POSITION; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return "center"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + return "left"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + return "left"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableValueTest#expectedValueType() + */ + @Override + protected Object expectedValueType() { + return String.class; + } + +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/DiagramLabelObservableValueTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/DiagramLabelObservableValueTest.java new file mode 100644 index 00000000000..11b529f1643 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/DiagramLabelObservableValueTest.java @@ -0,0 +1,111 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.diagram.properties.databinding.tests; + +import static org.junit.Assert.assertNotNull; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.papyrus.infra.gmfdiag.properties.modelelement.GMFModelElement; +import org.eclipse.papyrus.infra.internationalization.utils.utils.InternationalizationConstants; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.junit.utils.DiagramUtils; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrus.uml.properties.databinding.tests.AbstractUMLObservableValueTest; + +/** + * This allows to test the diagram label observable value. + */ +@SuppressWarnings({ "nls" }) +@PluginResource("model/DiagramLabelObservableValue.di") +public class DiagramLabelObservableValueTest extends AbstractUMLObservableValueTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#initializeContextObject() + */ + @Override + protected Object initializeContextObject() { + Diagram diagram = DiagramUtils.getNotationDiagram(editorFixture.getModelSet(), "ClassDiagram"); + assertNotNull(diagram); + + return diagram; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#createModelElement(org.eclipse.emf.edit.domain.EditingDomain, org.eclipse.emf.ecore.EObject) + */ + @Override + protected ModelElement createModelElement(final EditingDomain domain, final Object source) { + return new GMFModelElement((EObject) source, (TransactionalEditingDomain) domain); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return InternationalizationConstants.LABEL_PROPERTY_PATH; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return null; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + return "MyDiagramLabel"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + return "MyDiagramLabel"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableValueTest#expectedValueType() + */ + @Override + protected Object expectedValueType() { + return null; + } + +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/RulersUnitStyleObservableValueTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/RulersUnitStyleObservableValueTest.java new file mode 100644 index 00000000000..3b24e81acff --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/RulersUnitStyleObservableValueTest.java @@ -0,0 +1,74 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.diagram.properties.databinding.tests; + +/** + * This allows to test the rulers unit style with store observable value. + */ +@SuppressWarnings({ "nls" }) +public class RulersUnitStyleObservableValueTest extends AbstractStyleWithStoreObservableValueTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return "rulers.units"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return 0; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + return 10; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + return 10; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableValueTest#expectedValueType() + */ + @Override + protected Object expectedValueType() { + return Integer.class; + } + +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/SwitchOrientationObservableValueTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/SwitchOrientationObservableValueTest.java new file mode 100644 index 00000000000..13b0f02434b --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/databinding/tests/SwitchOrientationObservableValueTest.java @@ -0,0 +1,123 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.diagram.properties.databinding.tests; + +import static org.junit.Assert.assertNotNull; + +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gef.EditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.junit.utils.DiagramUtils; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrus.uml.diagram.activity.modelelement.ActivityNotationModelElement; +import org.eclipse.papyrus.uml.properties.databinding.tests.AbstractUMLObservableValueTest; +import org.eclipse.papyrus.uml.properties.tests.DiagramViewUtils; +import org.junit.Assert; + +/** + * This allows to test the connection decoration style observable value. + */ +@SuppressWarnings({ "nls" }) +@PluginResource("model/SwitchOrientationObservableValue.di") +public class SwitchOrientationObservableValueTest extends AbstractUMLObservableValueTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#initializeContextObject() + */ + @Override + protected Object initializeContextObject() { + Diagram diagram = DiagramUtils.getNotationDiagram(editorFixture.getModelSet(), "ActivityDiagram"); + assertNotNull(diagram); + + editorFixture.getPageManager().openPage(diagram); + editorFixture.flushDisplayEvents(); + + final View joinNodeView = DiagramViewUtils.getDiagramView(diagram, "JoinNode1"); + Assert.assertNotNull("The diagram view for 'JoinNode1' cannot be found", joinNodeView); + + final IGraphicalEditPart joinNodeEP = DiagramUtils.findEditPartforView(editorFixture.getEditor(), joinNodeView, IGraphicalEditPart.class); + Assert.assertNotNull("The edit part for 'JoinNode1' cannot be found", joinNodeEP); + + return joinNodeEP; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#createModelElement(org.eclipse.emf.edit.domain.EditingDomain, org.eclipse.emf.ecore.EObject) + */ + @Override + protected ModelElement createModelElement(final EditingDomain domain, final Object source) { + return new ActivityNotationModelElement((TransactionalEditingDomain) domain, (EditPart) source); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return "switchOrientation"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return true; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + return true; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + return true; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableValueTest#expectedValueType() + */ + @Override + protected Object expectedValueType() { + return Boolean.class; + } + +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/tests/AllTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/tests/AllTests.java new file mode 100644 index 00000000000..9567b6dd407 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.properties.tests/src/org/eclipse/papyrus/uml/diagram/properties/tests/AllTests.java @@ -0,0 +1,52 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + *****************************************************************************/ + +package org.eclipse.papyrus.uml.diagram.properties.tests; + +import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite; +import org.eclipse.papyrus.uml.diagram.properties.databinding.tests.CanonicalObservableValueTest; +import org.eclipse.papyrus.uml.diagram.properties.databinding.tests.ConnectionDecorationStyleObservableValueTest; +import org.eclipse.papyrus.uml.diagram.properties.databinding.tests.CustomBooleanStyleWithStoreObservableValueTest; +import org.eclipse.papyrus.uml.diagram.properties.databinding.tests.CustomDoubleStyleWithStoreObservableValueTest; +import org.eclipse.papyrus.uml.diagram.properties.databinding.tests.CustomIntStyleCompartmentObservableValueTest; +import org.eclipse.papyrus.uml.diagram.properties.databinding.tests.CustomIntStyleWithStoreObservableValueTest; +import org.eclipse.papyrus.uml.diagram.properties.databinding.tests.CustomStringStyleCompartmentObservableValueTest; +import org.eclipse.papyrus.uml.diagram.properties.databinding.tests.DiagramLabelObservableValueTest; +import org.eclipse.papyrus.uml.diagram.properties.databinding.tests.RulersUnitStyleObservableValueTest; +import org.eclipse.papyrus.uml.diagram.properties.databinding.tests.SwitchOrientationObservableValueTest; +import org.junit.runner.RunWith; +import org.junit.runners.Suite.SuiteClasses; + +/** + * Test suite for the UML Diagram Properties bundle. + */ +@RunWith(ClassificationSuite.class) +@SuiteClasses({ + // Tests for diagram observable values + CanonicalObservableValueTest.class, + ConnectionDecorationStyleObservableValueTest.class, + CustomStringStyleCompartmentObservableValueTest.class, + CustomIntStyleCompartmentObservableValueTest.class, + DiagramLabelObservableValueTest.class, + CustomBooleanStyleWithStoreObservableValueTest.class, + CustomDoubleStyleWithStoreObservableValueTest.class, + CustomIntStyleWithStoreObservableValueTest.class, + RulersUnitStyleObservableValueTest.class, + + // Test for activity diagram specific observable value + SwitchOrientationObservableValueTest.class, +}) +public class AllTests { + // Everything is specified in class annotations +} diff --git a/tests/junit/plugins/uml/diagram/pom.xml b/tests/junit/plugins/uml/diagram/pom.xml index 47285424ef4..28d9760fd22 100644 --- a/tests/junit/plugins/uml/diagram/pom.xml +++ b/tests/junit/plugins/uml/diagram/pom.xml @@ -32,6 +32,7 @@ <module>org.eclipse.papyrus.uml.diagram.timing.tests</module> <module>org.eclipse.papyrus.uml.diagram.usecase.tests</module> <module>org.eclipse.papyrus.uml.diagram.wizards.tests</module> + <module>org.eclipse.papyrus.uml.diagram.properties.tests</module> </modules> </project> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.classpath b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.classpath index eca7bdba8f0..3e5654f17eb 100644 --- a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.classpath +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.classpath @@ -2,6 +2,10 @@ <classpath> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> - <classpathentry kind="src" path="src"/> + <classpathentry kind="src" path="src"> + <attributes> + <attribute name="test" value="true"/> + </attributes> + </classpathentry> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.settings/org.eclipse.jdt.core.prefs index b3aa6d60f94..5a8cd60f98e 100644 --- a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.settings/org.eclipse.jdt.core.prefs +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.settings/org.eclipse.jdt.core.prefs @@ -6,6 +6,7 @@ org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 @@ -13,17 +14,20 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=0 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16 org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 @@ -109,11 +113,12 @@ org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert @@ -144,6 +149,8 @@ org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert @@ -168,13 +175,17 @@ org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert @@ -222,6 +233,8 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do no org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert @@ -258,9 +271,12 @@ org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not inser org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert @@ -286,6 +302,10 @@ org.eclipse.jdt.core.formatter.tabulation.char=tab org.eclipse.jdt.core.formatter.tabulation.size=4 org.eclipse.jdt.core.formatter.use_on_off_tags=false org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true +org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true +org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true +org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/META-INF/MANIFEST.MF index b85027621fb..b64f0246c99 100644 --- a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/META-INF/MANIFEST.MF +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/META-INF/MANIFEST.MF @@ -4,8 +4,11 @@ Require-Bundle: org.junit;bundle-version="4.10.0";visibility:=reexport, org.eclipse.papyrus.junit.utils;bundle-version="[2.0.0,3.0.0)", org.hamcrest.core, org.eclipse.papyrus.uml.properties;bundle-version="[3.1.100,4.0.0)", - org.eclipse.papyrus.infra.properties.ui;bundle-version="[3.3.0,4.0.0)" -Export-Package: org.eclipse.papyrus.uml.properties.modelelement.tests, + org.eclipse.papyrus.infra.properties.ui;bundle-version="[3.3.0,4.0.0)", + org.eclipse.papyrus.infra.internationalization.utils;bundle-version="[1.0.100,2.0.0)", + org.eclipse.papyrus.uml.tools;bundle-version="[4.1.0,5.0.0)" +Export-Package: org.eclipse.papyrus.uml.properties.databinding.tests, + org.eclipse.papyrus.uml.properties.modelelement.tests, org.eclipse.papyrus.uml.properties.tests Bundle-Vendor: %providerName Bundle-Version: 1.1.0.qualifier diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/AnnotationObservableValue.di b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/AnnotationObservableValue.di new file mode 100644 index 00000000000..8c549eecdc6 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/AnnotationObservableValue.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/AnnotationObservableValue.notation b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/AnnotationObservableValue.notation new file mode 100644 index 00000000000..bf9abab340f --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/AnnotationObservableValue.notation @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/AnnotationObservableValue.uml b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/AnnotationObservableValue.uml new file mode 100644 index 00000000000..6ef9b5ec26a --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/AnnotationObservableValue.uml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_ZG3o4KokEemdRud3bBEWMw" name="AnnotationObservableValue"> + <packageImport xmi:type="uml:PackageImport" xmi:id="_ZL3doKokEemdRud3bBEWMw"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> + <packagedElement xmi:type="uml:Class" xmi:id="_aYdMkKokEemdRud3bBEWMw" name="Class1"/> +</uml:Model> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/AppliedCommentsObservableList.di b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/AppliedCommentsObservableList.di new file mode 100644 index 00000000000..8c549eecdc6 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/AppliedCommentsObservableList.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/AppliedCommentsObservableList.notation b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/AppliedCommentsObservableList.notation new file mode 100644 index 00000000000..bf9abab340f --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/AppliedCommentsObservableList.notation @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/AppliedCommentsObservableList.uml b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/AppliedCommentsObservableList.uml new file mode 100644 index 00000000000..f0dcaf5f134 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/AppliedCommentsObservableList.uml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_9MyOkKldEemdRud3bBEWMw" name="AppliedCommentsObservableList"> + <ownedComment xmi:type="uml:Comment" xmi:id="_DH5iIKleEemdRud3bBEWMw"> + <body>TestBody</body> + </ownedComment> + <packageImport xmi:type="uml:PackageImport" xmi:id="_9mtxgKldEemdRud3bBEWMw"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> + <packagedElement xmi:type="uml:Class" xmi:id="_CExRMKleEemdRud3bBEWMw" name="Class1"/> +</uml:Model> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/BasicObservableList.di b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/BasicObservableList.di new file mode 100644 index 00000000000..8c549eecdc6 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/BasicObservableList.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/BasicObservableList.notation b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/BasicObservableList.notation new file mode 100644 index 00000000000..bf9abab340f --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/BasicObservableList.notation @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/BasicObservableList.uml b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/BasicObservableList.uml new file mode 100644 index 00000000000..dc819cedf67 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/BasicObservableList.uml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_PPd3AKoFEemdRud3bBEWMw" name="BasicObservableList"> + <packageImport xmi:type="uml:PackageImport" xmi:id="_PT314KoFEemdRud3bBEWMw"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> + <packagedElement xmi:type="uml:Class" xmi:id="_RG6g0KoFEemdRud3bBEWMw" name="Class1"> + <ownedOperation xmi:type="uml:Operation" xmi:id="_Zfc5EKoFEemdRud3bBEWMw" name="Operation1"/> + <nestedClassifier xmi:type="uml:OpaqueBehavior" xmi:id="_h7YjkKoFEemdRud3bBEWMw" name="OpaqueBehavior1"/> + </packagedElement> +</uml:Model> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/BasicObservableValue.di b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/BasicObservableValue.di new file mode 100644 index 00000000000..8c549eecdc6 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/BasicObservableValue.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/BasicObservableValue.notation b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/BasicObservableValue.notation new file mode 100644 index 00000000000..bf9abab340f --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/BasicObservableValue.notation @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/BasicObservableValue.uml b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/BasicObservableValue.uml new file mode 100644 index 00000000000..ef8b7d9c87b --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/BasicObservableValue.uml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_b7ny0KoAEemdRud3bBEWMw" name="NameObservableValue"> + <packageImport xmi:type="uml:PackageImport" xmi:id="_b_C6QKoAEemdRud3bBEWMw"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> + <packagedElement xmi:type="uml:Package" xmi:id="_rO1BsKoBEemdRud3bBEWMw" name="Package1" URI=""/> +</uml:Model> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ElementCustomizationObservableValue.di b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ElementCustomizationObservableValue.di new file mode 100644 index 00000000000..8c549eecdc6 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ElementCustomizationObservableValue.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ElementCustomizationObservableValue.notation b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ElementCustomizationObservableValue.notation new file mode 100644 index 00000000000..01c2a19cd96 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ElementCustomizationObservableValue.notation @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/gmfdiag/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_8sXTEKiiEemnUaUTM2dhVQ" type="PapyrusUMLClassDiagram" name="Class Diagram" measurementUnit="Pixel"> + <children xmi:type="notation:Shape" xmi:id="_-Bq5IKiiEemnUaUTM2dhVQ" type="Class_Shape"> + <children xmi:type="notation:DecorationNode" xmi:id="_-BrgMKiiEemnUaUTM2dhVQ" type="Class_NameLabel"/> + <children xmi:type="notation:DecorationNode" xmi:id="_-BrgMaiiEemnUaUTM2dhVQ" type="Class_FloatingNameLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_-BrgMqiiEemnUaUTM2dhVQ" y="15"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_-BrgM6iiEemnUaUTM2dhVQ" type="Class_AttributeCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_-BrgNKiiEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_-BrgNaiiEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_-BrgNqiiEemnUaUTM2dhVQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-BrgN6iiEemnUaUTM2dhVQ"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_-BrgOKiiEemnUaUTM2dhVQ" type="Class_OperationCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_-BrgOaiiEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_-BrgOqiiEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_-BrgO6iiEemnUaUTM2dhVQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-BrgPKiiEemnUaUTM2dhVQ"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_-BrgPaiiEemnUaUTM2dhVQ" type="Class_NestedClassifierCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_-BrgPqiiEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_-BrgP6iiEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_-BrgQKiiEemnUaUTM2dhVQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-BrgQaiiEemnUaUTM2dhVQ"/> + </children> + <element xmi:type="uml:Class" href="ElementCustomizationObservableValue.uml#_-Boc4KiiEemnUaUTM2dhVQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-Bq5IaiiEemnUaUTM2dhVQ" x="260" y="160"/> + </children> + <styles xmi:type="notation:StringValueStyle" xmi:id="_8sXTEaiiEemnUaUTM2dhVQ" name="diagram_compatibility_version" stringValue="1.4.0"/> + <styles xmi:type="notation:DiagramStyle" xmi:id="_8sXTEqiiEemnUaUTM2dhVQ"/> + <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_8sXTE6iiEemnUaUTM2dhVQ" diagramKindId="org.eclipse.papyrus.uml.diagram.class"> + <owner xmi:type="uml:Model" href="ElementCustomizationObservableValue.uml#_8sP-UKiiEemnUaUTM2dhVQ"/> + </styles> + <element xmi:type="uml:Model" href="ElementCustomizationObservableValue.uml#_8sP-UKiiEemnUaUTM2dhVQ"/> +</notation:Diagram> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ElementCustomizationObservableValue.uml b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ElementCustomizationObservableValue.uml new file mode 100644 index 00000000000..65553d4c6a2 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ElementCustomizationObservableValue.uml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_8sP-UKiiEemnUaUTM2dhVQ" name="ElementCustomizationObservableValue"> + <packageImport xmi:type="uml:PackageImport" xmi:id="_8wx5AKiiEemnUaUTM2dhVQ"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> + <packagedElement xmi:type="uml:Class" xmi:id="_-Boc4KiiEemnUaUTM2dhVQ" name="Class1"/> +</uml:Model> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ExtensionEndMultiplicityObservableValue.di b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ExtensionEndMultiplicityObservableValue.di new file mode 100644 index 00000000000..8c549eecdc6 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ExtensionEndMultiplicityObservableValue.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ExtensionEndMultiplicityObservableValue.notation b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ExtensionEndMultiplicityObservableValue.notation new file mode 100644 index 00000000000..bf9abab340f --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ExtensionEndMultiplicityObservableValue.notation @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ExtensionEndMultiplicityObservableValue.uml b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ExtensionEndMultiplicityObservableValue.uml new file mode 100644 index 00000000000..0e140cf0f67 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ExtensionEndMultiplicityObservableValue.uml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_l57UQKkqEemnUaUTM2dhVQ" name="model"> + <packageImport xmi:type="uml:PackageImport" xmi:id="_l_DE0KkqEemnUaUTM2dhVQ"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> + <packagedElement xmi:type="uml:Activity" xmi:id="_zGeOEKkqEemnUaUTM2dhVQ" name="Activity1"> + <ownedAttribute xmi:type="uml:ExtensionEnd" xmi:id="_1SJbcKkqEemnUaUTM2dhVQ" name="ExtensionEnd1"> + <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_1fFEMKkqEemnUaUTM2dhVQ" value="1"/> + </ownedAttribute> + </packagedElement> +</uml:Model> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ExtensionRequiredObservableValue.di b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ExtensionRequiredObservableValue.di new file mode 100644 index 00000000000..247ed5e3570 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ExtensionRequiredObservableValue.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.uml.architecture.Profile"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ExtensionRequiredObservableValue.notation b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ExtensionRequiredObservableValue.notation new file mode 100644 index 00000000000..75ffa1f555a --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ExtensionRequiredObservableValue.notation @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8"?> +<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/gmfdiag/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_CwMqEKktEemnUaUTM2dhVQ" type="PapyrusUMLProfileDiagram" name="Profile Diagram" measurementUnit="Pixel"> + <children xmi:type="notation:Shape" xmi:id="_EjfzsKktEemnUaUTM2dhVQ" type="Class_MetaclassShape"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Ejho4KktEemnUaUTM2dhVQ" source="Stereotype_Annotation"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Ejho4aktEemnUaUTM2dhVQ" key="StereotypeWithQualifiedNameList" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Ejho4qktEemnUaUTM2dhVQ" key="StereotypeList" value="StandardProfile::Metaclass"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Ejho46ktEemnUaUTM2dhVQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Ejho5KktEemnUaUTM2dhVQ" key="PropStereoDisplay" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Ejho5aktEemnUaUTM2dhVQ" key="StereotypePropertyLocation" value="Compartment"/> + </eAnnotations> + <children xmi:type="notation:DecorationNode" xmi:id="_EjhB0KktEemnUaUTM2dhVQ" type="Class_MetaclassNameLabel"/> + <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_EjhB0aktEemnUaUTM2dhVQ" x="340" y="80"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_EkKiEKktEemnUaUTM2dhVQ" type="StereotypeComment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_EkKiEaktEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:EObjectValueStyle" xmi:id="_EkLwMKktEemnUaUTM2dhVQ" name="BASE_ELEMENT"> + <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/> + </styles> + <element xsi:nil="true"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_EkKiEqktEemnUaUTM2dhVQ" x="540" y="80"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_E-GFAKktEemnUaUTM2dhVQ" type="Stereotype_Shape"> + <children xmi:type="notation:DecorationNode" xmi:id="_E-GsEKktEemnUaUTM2dhVQ" type="Stereotype_NameLabel"/> + <children xmi:type="notation:BasicCompartment" xmi:id="_E-GsEaktEemnUaUTM2dhVQ" type="Stereotype_AttributeCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_E-GsEqktEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_E-GsE6ktEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_E-GsFKktEemnUaUTM2dhVQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_E-GsFaktEemnUaUTM2dhVQ"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_E-GsFqktEemnUaUTM2dhVQ" type="Stereotype_OperationCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_E-GsF6ktEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_E-GsGKktEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_E-GsGaktEemnUaUTM2dhVQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_E-GsGqktEemnUaUTM2dhVQ"/> + </children> + <element xmi:type="uml:Stereotype" href="ExtensionRequiredObservableValue.uml#_E-EP0KktEemnUaUTM2dhVQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_E-GFAaktEemnUaUTM2dhVQ" x="340" y="240"/> + </children> + <styles xmi:type="notation:StringValueStyle" xmi:id="_CwMqEaktEemnUaUTM2dhVQ" name="diagram_compatibility_version" stringValue="1.4.0"/> + <styles xmi:type="notation:DiagramStyle" xmi:id="_CwMqEqktEemnUaUTM2dhVQ"/> + <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_CwMqE6ktEemnUaUTM2dhVQ" diagramKindId="org.eclipse.papyrus.uml.diagram.profile"> + <owner xmi:type="uml:Profile" href="ExtensionRequiredObservableValue.uml#_CwGjcKktEemnUaUTM2dhVQ"/> + </styles> + <element xmi:type="uml:Profile" href="ExtensionRequiredObservableValue.uml#_CwGjcKktEemnUaUTM2dhVQ"/> + <edges xmi:type="notation:Connector" xmi:id="_EkLwMaktEemnUaUTM2dhVQ" type="StereotypeCommentLink" source="_EjfzsKktEemnUaUTM2dhVQ" target="_EkKiEKktEemnUaUTM2dhVQ"> + <styles xmi:type="notation:FontStyle" xmi:id="_EkLwMqktEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:EObjectValueStyle" xmi:id="_EkMXQqktEemnUaUTM2dhVQ" name="BASE_ELEMENT"> + <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/> + </styles> + <element xsi:nil="true"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_EkLwM6ktEemnUaUTM2dhVQ" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_EkMXQKktEemnUaUTM2dhVQ"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_EkMXQaktEemnUaUTM2dhVQ"/> + </edges> + <edges xmi:type="notation:Connector" xmi:id="_FfLY0KktEemnUaUTM2dhVQ" type="Extension_Edge" source="_E-GFAKktEemnUaUTM2dhVQ" target="_EjfzsKktEemnUaUTM2dhVQ"> + <styles xmi:type="notation:FontStyle" xmi:id="_FfLY0aktEemnUaUTM2dhVQ"/> + <element xmi:type="uml:Extension" href="ExtensionRequiredObservableValue.uml#_Fe3PwKktEemnUaUTM2dhVQ"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_FfLY0qktEemnUaUTM2dhVQ" points="[380, 240, -643984, -643984]$[380, 130, -643984, -643984]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Ffb3gKktEemnUaUTM2dhVQ" id="(0.4,0.0)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_FfcekKktEemnUaUTM2dhVQ" id="(0.4,1.0)"/> + </edges> +</notation:Diagram> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ExtensionRequiredObservableValue.uml b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ExtensionRequiredObservableValue.uml new file mode 100644 index 00000000000..fc206e0d3d9 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ExtensionRequiredObservableValue.uml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Profile xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_CwGjcKktEemnUaUTM2dhVQ" name="ExtensionRequiredObservableValue" metaclassReference="_EjXQ0KktEemnUaUTM2dhVQ"> + <elementImport xmi:type="uml:ElementImport" xmi:id="_EjXQ0KktEemnUaUTM2dhVQ" alias="Class"> + <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/> + </elementImport> + <packageImport xmi:type="uml:PackageImport" xmi:id="_C0t9sKktEemnUaUTM2dhVQ"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> + <packageImport xmi:type="uml:PackageImport" xmi:id="_C0t9saktEemnUaUTM2dhVQ"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_METAMODELS/UML.metamodel.uml#_0"/> + </packageImport> + <packagedElement xmi:type="uml:Stereotype" xmi:id="_E-EP0KktEemnUaUTM2dhVQ" name="Stereotype4"> + <ownedAttribute xmi:type="uml:Property" xmi:id="_Fe99cKktEemnUaUTM2dhVQ" name="base_Class" association="_Fe3PwKktEemnUaUTM2dhVQ"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/> + <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_Fe99caktEemnUaUTM2dhVQ"/> + </ownedAttribute> + </packagedElement> + <packagedElement xmi:type="uml:Extension" xmi:id="_Fe3PwKktEemnUaUTM2dhVQ" name="Extension1" memberEnd="_Fe9WYKktEemnUaUTM2dhVQ _Fe99cKktEemnUaUTM2dhVQ"> + <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_Fe9WYKktEemnUaUTM2dhVQ" name="extension_Stereotype4" type="_E-EP0KktEemnUaUTM2dhVQ" aggregation="composite" association="_Fe3PwKktEemnUaUTM2dhVQ"/> + </packagedElement> +</uml:Profile> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ImageObservableValue.di b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ImageObservableValue.di new file mode 100644 index 00000000000..8c549eecdc6 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ImageObservableValue.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ImageObservableValue.notation b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ImageObservableValue.notation new file mode 100644 index 00000000000..bf9abab340f --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ImageObservableValue.notation @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ImageObservableValue.uml b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ImageObservableValue.uml new file mode 100644 index 00000000000..e4461711ed5 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ImageObservableValue.uml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_LVO6kKibEemnUaUTM2dhVQ" name="ImageObservableValue"> + <packageImport xmi:type="uml:PackageImport" xmi:id="_LZwOMKibEemnUaUTM2dhVQ"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> + <packagedElement xmi:type="uml:Stereotype" xmi:id="_UaEYIKibEemnUaUTM2dhVQ" name="Stereotype1"> + <icon xmi:type="uml:Image" xmi:id="_U8oSoKibEemnUaUTM2dhVQ"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_XGzEIKibEemnUaUTM2dhVQ" source="image_papyrus"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XG05UKibEemnUaUTM2dhVQ" key="image_name_key" value="Image1"/> + </eAnnotations> + </icon> + </packagedElement> +</uml:Model> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ImportedPackageLocationObservableValue.di b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ImportedPackageLocationObservableValue.di new file mode 100644 index 00000000000..8c549eecdc6 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ImportedPackageLocationObservableValue.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ImportedPackageLocationObservableValue.notation b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ImportedPackageLocationObservableValue.notation new file mode 100644 index 00000000000..bf9abab340f --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ImportedPackageLocationObservableValue.notation @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ImportedPackageLocationObservableValue.uml b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ImportedPackageLocationObservableValue.uml new file mode 100644 index 00000000000..50cfc8e0650 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ImportedPackageLocationObservableValue.uml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_VGsDwKkuEemnUaUTM2dhVQ" name="ImportedPackageLocationObservableValue"> + <packageImport xmi:type="uml:PackageImport" xmi:id="_VLnnEKkuEemnUaUTM2dhVQ"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> +</uml:Model> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/KeywordObservableValue.di b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/KeywordObservableValue.di new file mode 100644 index 00000000000..247ed5e3570 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/KeywordObservableValue.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.uml.architecture.Profile"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/KeywordObservableValue.notation b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/KeywordObservableValue.notation new file mode 100644 index 00000000000..bf9abab340f --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/KeywordObservableValue.notation @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/KeywordObservableValue.uml b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/KeywordObservableValue.uml new file mode 100644 index 00000000000..180b540fe0a --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/KeywordObservableValue.uml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="__3AZMKiZEemnUaUTM2dhVQ" name="KeywordObservableValue"> + <packageImport xmi:type="uml:PackageImport" xmi:id="__8fWIKiZEemnUaUTM2dhVQ"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> + <packagedElement xmi:type="uml:Stereotype" xmi:id="_GoxA4KiaEemnUaUTM2dhVQ" name="Stereotype1"/> +</uml:Model> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/MaskValueObservableList.di b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/MaskValueObservableList.di new file mode 100644 index 00000000000..8c549eecdc6 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/MaskValueObservableList.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/MaskValueObservableList.notation b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/MaskValueObservableList.notation new file mode 100644 index 00000000000..5e574bcef78 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/MaskValueObservableList.notation @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/gmfdiag/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_kZ3NsKlAEemqIdFyYTD4QQ" type="PapyrusUMLClassDiagram" name="Class Diagram" measurementUnit="Pixel"> + <children xmi:type="notation:Shape" xmi:id="_oAsKcKlAEemqIdFyYTD4QQ" type="Class_Shape"> + <children xmi:type="notation:DecorationNode" xmi:id="_oA4-wKlAEemqIdFyYTD4QQ" type="Class_NameLabel"/> + <children xmi:type="notation:DecorationNode" xmi:id="_oA4-walAEemqIdFyYTD4QQ" type="Class_FloatingNameLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_oA4-wqlAEemqIdFyYTD4QQ" y="15"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_oA93QKlAEemqIdFyYTD4QQ" type="Class_AttributeCompartment"> + <children xmi:type="notation:Shape" xmi:id="_tcqD4KlAEemqIdFyYTD4QQ" type="Property_ClassAttributeLabel"> + <element xmi:type="uml:Property" href="MaskValueObservableList.uml#_tcTekKlAEemqIdFyYTD4QQ"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_tcqD4alAEemqIdFyYTD4QQ"/> + </children> + <styles xmi:type="notation:TitleStyle" xmi:id="_oA93QalAEemqIdFyYTD4QQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_oA93QqlAEemqIdFyYTD4QQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_oA93Q6lAEemqIdFyYTD4QQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_oA93RKlAEemqIdFyYTD4QQ"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_oA-eUKlAEemqIdFyYTD4QQ" type="Class_OperationCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_oA-eUalAEemqIdFyYTD4QQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_oA-eUqlAEemqIdFyYTD4QQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_oA-eU6lAEemqIdFyYTD4QQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_oA-eVKlAEemqIdFyYTD4QQ"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_oA-eValAEemqIdFyYTD4QQ" type="Class_NestedClassifierCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_oA-eVqlAEemqIdFyYTD4QQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_oA-eV6lAEemqIdFyYTD4QQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_oA-eWKlAEemqIdFyYTD4QQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_oA-eWalAEemqIdFyYTD4QQ"/> + </children> + <element xmi:type="uml:Class" href="MaskValueObservableList.uml#_oAbrwKlAEemqIdFyYTD4QQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_oAsKcalAEemqIdFyYTD4QQ" x="200" y="180"/> + </children> + <styles xmi:type="notation:StringValueStyle" xmi:id="_kZ3NsalAEemqIdFyYTD4QQ" name="diagram_compatibility_version" stringValue="1.4.0"/> + <styles xmi:type="notation:DiagramStyle" xmi:id="_kZ3NsqlAEemqIdFyYTD4QQ"/> + <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_kZ3Ns6lAEemqIdFyYTD4QQ" diagramKindId="org.eclipse.papyrus.uml.diagram.class"> + <owner xmi:type="uml:Model" href="MaskValueObservableList.uml#_kW1u4KlAEemqIdFyYTD4QQ"/> + </styles> + <element xmi:type="uml:Model" href="MaskValueObservableList.uml#_kW1u4KlAEemqIdFyYTD4QQ"/> +</notation:Diagram> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/MaskValueObservableList.uml b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/MaskValueObservableList.uml new file mode 100644 index 00000000000..530d2c85572 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/MaskValueObservableList.uml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_kW1u4KlAEemqIdFyYTD4QQ" name="MaskValueObservableList"> + <packageImport xmi:type="uml:PackageImport" xmi:id="_kyBPAKlAEemqIdFyYTD4QQ"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> + <packagedElement xmi:type="uml:Class" xmi:id="_oAbrwKlAEemqIdFyYTD4QQ" name="Class1"> + <ownedAttribute xmi:type="uml:Property" xmi:id="_tcTekKlAEemqIdFyYTD4QQ" name="Property1"/> + </packagedElement> +</uml:Model> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/MultiplicityObservableValue.di b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/MultiplicityObservableValue.di new file mode 100644 index 00000000000..8c549eecdc6 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/MultiplicityObservableValue.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/MultiplicityObservableValue.notation b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/MultiplicityObservableValue.notation new file mode 100644 index 00000000000..bf9abab340f --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/MultiplicityObservableValue.notation @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/MultiplicityObservableValue.uml b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/MultiplicityObservableValue.uml new file mode 100644 index 00000000000..34a099df9f2 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/MultiplicityObservableValue.uml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_EjA1IKh1EemnUaUTM2dhVQ" name="MultiplicityObservableValue"> + <packageImport xmi:type="uml:PackageImport" xmi:id="_E9ACcKh1EemnUaUTM2dhVQ"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> + <packagedElement xmi:type="uml:Class" xmi:id="_Pn6tAKh1EemnUaUTM2dhVQ" name="Class1" visibility="public"> + <ownedAttribute xmi:type="uml:Property" xmi:id="_Rl5coKh1EemnUaUTM2dhVQ" name="Property1" visibility="public"/> + </packagedElement> +</uml:Model> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/NavigationObservableValue.di b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/NavigationObservableValue.di new file mode 100644 index 00000000000..8c549eecdc6 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/NavigationObservableValue.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/NavigationObservableValue.notation b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/NavigationObservableValue.notation new file mode 100644 index 00000000000..ea65b0abe59 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/NavigationObservableValue.notation @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="UTF-8"?> +<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/gmfdiag/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_WOQ2cKiXEemnUaUTM2dhVQ" type="PapyrusUMLClassDiagram" name="NewClassDiagram" measurementUnit="Pixel"> + <children xmi:type="notation:Shape" xmi:id="_YE95YKiXEemnUaUTM2dhVQ" type="Class_Shape"> + <children xmi:type="notation:DecorationNode" xmi:id="_YFSCcKiXEemnUaUTM2dhVQ" type="Class_NameLabel"/> + <children xmi:type="notation:DecorationNode" xmi:id="_YFSCcaiXEemnUaUTM2dhVQ" type="Class_FloatingNameLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_YFSCcqiXEemnUaUTM2dhVQ" y="15"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_YFYwIKiXEemnUaUTM2dhVQ" type="Class_AttributeCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_YFYwIaiXEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_YFYwIqiXEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_YFYwI6iXEemnUaUTM2dhVQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YFYwJKiXEemnUaUTM2dhVQ"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_YFYwJaiXEemnUaUTM2dhVQ" type="Class_OperationCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_YFYwJqiXEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_YFYwJ6iXEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_YFYwKKiXEemnUaUTM2dhVQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YFYwKaiXEemnUaUTM2dhVQ"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_YFYwKqiXEemnUaUTM2dhVQ" type="Class_NestedClassifierCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_YFYwK6iXEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_YFYwLKiXEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_YFYwLaiXEemnUaUTM2dhVQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YFYwLqiXEemnUaUTM2dhVQ"/> + </children> + <element xmi:type="uml:Class" href="NavigationObservableValue.uml#_YEyTMKiXEemnUaUTM2dhVQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YE-gcKiXEemnUaUTM2dhVQ" x="180" y="140"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_YfKiEKiXEemnUaUTM2dhVQ" type="Class_Shape"> + <children xmi:type="notation:DecorationNode" xmi:id="_YfLJIKiXEemnUaUTM2dhVQ" type="Class_NameLabel"/> + <children xmi:type="notation:DecorationNode" xmi:id="_YfLwMKiXEemnUaUTM2dhVQ" type="Class_FloatingNameLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_YfLwMaiXEemnUaUTM2dhVQ" y="15"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_YfLwMqiXEemnUaUTM2dhVQ" type="Class_AttributeCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_YfLwM6iXEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_YfLwNKiXEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_YfLwNaiXEemnUaUTM2dhVQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YfLwNqiXEemnUaUTM2dhVQ"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_YfLwN6iXEemnUaUTM2dhVQ" type="Class_OperationCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_YfLwOKiXEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_YfLwOaiXEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_YfLwOqiXEemnUaUTM2dhVQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YfLwO6iXEemnUaUTM2dhVQ"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_YfLwPKiXEemnUaUTM2dhVQ" type="Class_NestedClassifierCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_YfLwPaiXEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_YfLwPqiXEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_YfLwP6iXEemnUaUTM2dhVQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YfLwQKiXEemnUaUTM2dhVQ"/> + </children> + <element xmi:type="uml:Class" href="NavigationObservableValue.uml#_YfIs4KiXEemnUaUTM2dhVQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YfKiEaiXEemnUaUTM2dhVQ" x="560" y="140"/> + </children> + <styles xmi:type="notation:StringValueStyle" xmi:id="_WORdgKiXEemnUaUTM2dhVQ" name="diagram_compatibility_version" stringValue="1.4.0"/> + <styles xmi:type="notation:DiagramStyle" xmi:id="_WORdgaiXEemnUaUTM2dhVQ"/> + <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_WORdgqiXEemnUaUTM2dhVQ" diagramKindId="org.eclipse.papyrus.uml.diagram.class"> + <owner xmi:type="uml:Model" href="NavigationObservableValue.uml#_U1YX8KiXEemnUaUTM2dhVQ"/> + </styles> + <element xmi:type="uml:Model" href="NavigationObservableValue.uml#_U1YX8KiXEemnUaUTM2dhVQ"/> + <edges xmi:type="notation:Connector" xmi:id="_ZaKKsKiXEemnUaUTM2dhVQ" type="Association_Edge" source="_YE95YKiXEemnUaUTM2dhVQ" target="_YfKiEKiXEemnUaUTM2dhVQ"> + <children xmi:type="notation:DecorationNode" xmi:id="_ZaKxwKiXEemnUaUTM2dhVQ" type="Association_StereotypeLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_ZaKxwaiXEemnUaUTM2dhVQ" y="-20"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_ZaKxwqiXEemnUaUTM2dhVQ" type="Association_NameLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_ZaKxw6iXEemnUaUTM2dhVQ" y="20"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_ZaKxxKiXEemnUaUTM2dhVQ" type="Association_TargetRoleLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_ZaKxxaiXEemnUaUTM2dhVQ" y="-20"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_ZaKxxqiXEemnUaUTM2dhVQ" type="Association_SourceRoleLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_ZaKxx6iXEemnUaUTM2dhVQ" y="20"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_ZaKxyKiXEemnUaUTM2dhVQ" type="Association_SourceMultiplicityLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_ZaKxyaiXEemnUaUTM2dhVQ" y="20"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_ZaKxyqiXEemnUaUTM2dhVQ" type="Association_TargetMultiplicityLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_ZaKxy6iXEemnUaUTM2dhVQ" y="-20"/> + </children> + <styles xmi:type="notation:FontStyle" xmi:id="_ZaKKsaiXEemnUaUTM2dhVQ"/> + <element xmi:type="uml:Association" href="NavigationObservableValue.uml#_ZZn_MKiXEemnUaUTM2dhVQ"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ZaKKsqiXEemnUaUTM2dhVQ" points="[280, 180, -643984, -643984]$[560, 180, -643984, -643984]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Zda6EKiXEemnUaUTM2dhVQ" id="(1.0,0.4)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Zda6EaiXEemnUaUTM2dhVQ" id="(0.0,0.4)"/> + </edges> +</notation:Diagram> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/NavigationObservableValue.uml b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/NavigationObservableValue.uml new file mode 100644 index 00000000000..48a938c4143 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/NavigationObservableValue.uml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_U1YX8KiXEemnUaUTM2dhVQ" name="NavigationObservableValue"> + <packageImport xmi:type="uml:PackageImport" xmi:id="_U6ycYKiXEemnUaUTM2dhVQ"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> + <packagedElement xmi:type="uml:Class" xmi:id="_YEyTMKiXEemnUaUTM2dhVQ" name="Class1"/> + <packagedElement xmi:type="uml:Class" xmi:id="_YfIs4KiXEemnUaUTM2dhVQ" name="Class2"/> + <packagedElement xmi:type="uml:Association" xmi:id="_ZZn_MKiXEemnUaUTM2dhVQ" name="Association1" memberEnd="_ZZsQoKiXEemnUaUTM2dhVQ _ZZs3sKiXEemnUaUTM2dhVQ"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ZZrCgKiXEemnUaUTM2dhVQ" source="org.eclipse.papyrus"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ZZrpkKiXEemnUaUTM2dhVQ" key="nature" value="UML_Nature"/> + </eAnnotations> + <ownedEnd xmi:type="uml:Property" xmi:id="_ZZsQoKiXEemnUaUTM2dhVQ" name="class3" type="_YfIs4KiXEemnUaUTM2dhVQ" association="_ZZn_MKiXEemnUaUTM2dhVQ"/> + <ownedEnd xmi:type="uml:Property" xmi:id="_ZZs3sKiXEemnUaUTM2dhVQ" name="class2" type="_YEyTMKiXEemnUaUTM2dhVQ" association="_ZZn_MKiXEemnUaUTM2dhVQ"/> + </packagedElement> +</uml:Model> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/OwnedCommentsObservableList.di b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/OwnedCommentsObservableList.di new file mode 100644 index 00000000000..8c549eecdc6 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/OwnedCommentsObservableList.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/OwnedCommentsObservableList.notation b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/OwnedCommentsObservableList.notation new file mode 100644 index 00000000000..bf9abab340f --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/OwnedCommentsObservableList.notation @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/OwnedCommentsObservableList.uml b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/OwnedCommentsObservableList.uml new file mode 100644 index 00000000000..3e582bcc532 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/OwnedCommentsObservableList.uml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_osg9kKlfEemdRud3bBEWMw" name="OwnedCommentsObservableList"> + <ownedComment xmi:type="uml:Comment" xmi:id="_qseqMKlfEemdRud3bBEWMw"> + <body>BodyTest</body> + </ownedComment> + <packageImport xmi:type="uml:PackageImport" xmi:id="_o11RoKlfEemdRud3bBEWMw"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> + <packagedElement xmi:type="uml:Package" xmi:id="_sUFhMKlfEemdRud3bBEWMw" name="Package1"/> +</uml:Model> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/OwnerObservableValue.di b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/OwnerObservableValue.di new file mode 100644 index 00000000000..8c549eecdc6 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/OwnerObservableValue.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/OwnerObservableValue.notation b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/OwnerObservableValue.notation new file mode 100644 index 00000000000..ea65b0abe59 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/OwnerObservableValue.notation @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="UTF-8"?> +<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/gmfdiag/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_WOQ2cKiXEemnUaUTM2dhVQ" type="PapyrusUMLClassDiagram" name="NewClassDiagram" measurementUnit="Pixel"> + <children xmi:type="notation:Shape" xmi:id="_YE95YKiXEemnUaUTM2dhVQ" type="Class_Shape"> + <children xmi:type="notation:DecorationNode" xmi:id="_YFSCcKiXEemnUaUTM2dhVQ" type="Class_NameLabel"/> + <children xmi:type="notation:DecorationNode" xmi:id="_YFSCcaiXEemnUaUTM2dhVQ" type="Class_FloatingNameLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_YFSCcqiXEemnUaUTM2dhVQ" y="15"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_YFYwIKiXEemnUaUTM2dhVQ" type="Class_AttributeCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_YFYwIaiXEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_YFYwIqiXEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_YFYwI6iXEemnUaUTM2dhVQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YFYwJKiXEemnUaUTM2dhVQ"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_YFYwJaiXEemnUaUTM2dhVQ" type="Class_OperationCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_YFYwJqiXEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_YFYwJ6iXEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_YFYwKKiXEemnUaUTM2dhVQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YFYwKaiXEemnUaUTM2dhVQ"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_YFYwKqiXEemnUaUTM2dhVQ" type="Class_NestedClassifierCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_YFYwK6iXEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_YFYwLKiXEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_YFYwLaiXEemnUaUTM2dhVQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YFYwLqiXEemnUaUTM2dhVQ"/> + </children> + <element xmi:type="uml:Class" href="NavigationObservableValue.uml#_YEyTMKiXEemnUaUTM2dhVQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YE-gcKiXEemnUaUTM2dhVQ" x="180" y="140"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_YfKiEKiXEemnUaUTM2dhVQ" type="Class_Shape"> + <children xmi:type="notation:DecorationNode" xmi:id="_YfLJIKiXEemnUaUTM2dhVQ" type="Class_NameLabel"/> + <children xmi:type="notation:DecorationNode" xmi:id="_YfLwMKiXEemnUaUTM2dhVQ" type="Class_FloatingNameLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_YfLwMaiXEemnUaUTM2dhVQ" y="15"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_YfLwMqiXEemnUaUTM2dhVQ" type="Class_AttributeCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_YfLwM6iXEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_YfLwNKiXEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_YfLwNaiXEemnUaUTM2dhVQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YfLwNqiXEemnUaUTM2dhVQ"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_YfLwN6iXEemnUaUTM2dhVQ" type="Class_OperationCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_YfLwOKiXEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_YfLwOaiXEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_YfLwOqiXEemnUaUTM2dhVQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YfLwO6iXEemnUaUTM2dhVQ"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_YfLwPKiXEemnUaUTM2dhVQ" type="Class_NestedClassifierCompartment"> + <styles xmi:type="notation:TitleStyle" xmi:id="_YfLwPaiXEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_YfLwPqiXEemnUaUTM2dhVQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_YfLwP6iXEemnUaUTM2dhVQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YfLwQKiXEemnUaUTM2dhVQ"/> + </children> + <element xmi:type="uml:Class" href="NavigationObservableValue.uml#_YfIs4KiXEemnUaUTM2dhVQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YfKiEaiXEemnUaUTM2dhVQ" x="560" y="140"/> + </children> + <styles xmi:type="notation:StringValueStyle" xmi:id="_WORdgKiXEemnUaUTM2dhVQ" name="diagram_compatibility_version" stringValue="1.4.0"/> + <styles xmi:type="notation:DiagramStyle" xmi:id="_WORdgaiXEemnUaUTM2dhVQ"/> + <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_WORdgqiXEemnUaUTM2dhVQ" diagramKindId="org.eclipse.papyrus.uml.diagram.class"> + <owner xmi:type="uml:Model" href="NavigationObservableValue.uml#_U1YX8KiXEemnUaUTM2dhVQ"/> + </styles> + <element xmi:type="uml:Model" href="NavigationObservableValue.uml#_U1YX8KiXEemnUaUTM2dhVQ"/> + <edges xmi:type="notation:Connector" xmi:id="_ZaKKsKiXEemnUaUTM2dhVQ" type="Association_Edge" source="_YE95YKiXEemnUaUTM2dhVQ" target="_YfKiEKiXEemnUaUTM2dhVQ"> + <children xmi:type="notation:DecorationNode" xmi:id="_ZaKxwKiXEemnUaUTM2dhVQ" type="Association_StereotypeLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_ZaKxwaiXEemnUaUTM2dhVQ" y="-20"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_ZaKxwqiXEemnUaUTM2dhVQ" type="Association_NameLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_ZaKxw6iXEemnUaUTM2dhVQ" y="20"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_ZaKxxKiXEemnUaUTM2dhVQ" type="Association_TargetRoleLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_ZaKxxaiXEemnUaUTM2dhVQ" y="-20"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_ZaKxxqiXEemnUaUTM2dhVQ" type="Association_SourceRoleLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_ZaKxx6iXEemnUaUTM2dhVQ" y="20"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_ZaKxyKiXEemnUaUTM2dhVQ" type="Association_SourceMultiplicityLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_ZaKxyaiXEemnUaUTM2dhVQ" y="20"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_ZaKxyqiXEemnUaUTM2dhVQ" type="Association_TargetMultiplicityLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_ZaKxy6iXEemnUaUTM2dhVQ" y="-20"/> + </children> + <styles xmi:type="notation:FontStyle" xmi:id="_ZaKKsaiXEemnUaUTM2dhVQ"/> + <element xmi:type="uml:Association" href="NavigationObservableValue.uml#_ZZn_MKiXEemnUaUTM2dhVQ"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ZaKKsqiXEemnUaUTM2dhVQ" points="[280, 180, -643984, -643984]$[560, 180, -643984, -643984]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Zda6EKiXEemnUaUTM2dhVQ" id="(1.0,0.4)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Zda6EaiXEemnUaUTM2dhVQ" id="(0.0,0.4)"/> + </edges> +</notation:Diagram> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/OwnerObservableValue.uml b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/OwnerObservableValue.uml new file mode 100644 index 00000000000..48a938c4143 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/OwnerObservableValue.uml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_U1YX8KiXEemnUaUTM2dhVQ" name="NavigationObservableValue"> + <packageImport xmi:type="uml:PackageImport" xmi:id="_U6ycYKiXEemnUaUTM2dhVQ"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> + <packagedElement xmi:type="uml:Class" xmi:id="_YEyTMKiXEemnUaUTM2dhVQ" name="Class1"/> + <packagedElement xmi:type="uml:Class" xmi:id="_YfIs4KiXEemnUaUTM2dhVQ" name="Class2"/> + <packagedElement xmi:type="uml:Association" xmi:id="_ZZn_MKiXEemnUaUTM2dhVQ" name="Association1" memberEnd="_ZZsQoKiXEemnUaUTM2dhVQ _ZZs3sKiXEemnUaUTM2dhVQ"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ZZrCgKiXEemnUaUTM2dhVQ" source="org.eclipse.papyrus"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ZZrpkKiXEemnUaUTM2dhVQ" key="nature" value="UML_Nature"/> + </eAnnotations> + <ownedEnd xmi:type="uml:Property" xmi:id="_ZZsQoKiXEemnUaUTM2dhVQ" name="class3" type="_YfIs4KiXEemnUaUTM2dhVQ" association="_ZZn_MKiXEemnUaUTM2dhVQ"/> + <ownedEnd xmi:type="uml:Property" xmi:id="_ZZs3sKiXEemnUaUTM2dhVQ" name="class2" type="_YEyTMKiXEemnUaUTM2dhVQ" association="_ZZn_MKiXEemnUaUTM2dhVQ"/> + </packagedElement> +</uml:Model> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ProvidedAndRequiredInterfaceObservableList.di b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ProvidedAndRequiredInterfaceObservableList.di new file mode 100644 index 00000000000..8c549eecdc6 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ProvidedAndRequiredInterfaceObservableList.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ProvidedAndRequiredInterfaceObservableList.notation b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ProvidedAndRequiredInterfaceObservableList.notation new file mode 100644 index 00000000000..bf9abab340f --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ProvidedAndRequiredInterfaceObservableList.notation @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ProvidedAndRequiredInterfaceObservableList.uml b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ProvidedAndRequiredInterfaceObservableList.uml new file mode 100644 index 00000000000..dc7a72a46e9 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/ProvidedAndRequiredInterfaceObservableList.uml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_O_RUkKllEemdRud3bBEWMw" name="ProvidedInterfaceObservableList"> + <packageImport xmi:type="uml:PackageImport" xmi:id="_PEvqcKllEemdRud3bBEWMw"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> + <packagedElement xmi:type="uml:Interface" xmi:id="_RTahcKllEemdRud3bBEWMw" name="Interface1"/> + <packagedElement xmi:type="uml:Component" xmi:id="_a4WbYKllEemdRud3bBEWMw" name="Component1"> + <ownedAttribute xmi:type="uml:Port" xmi:id="_cGVRcKllEemdRud3bBEWMw" name="Port1" visibility="public" type="_9XOREKlqEemdRud3bBEWMw" aggregation="composite"/> + </packagedElement> + <packagedElement xmi:type="uml:Class" xmi:id="_9XOREKlqEemdRud3bBEWMw" name="Type"/> +</uml:Model> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/StereotypeApplicationObservableList.di b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/StereotypeApplicationObservableList.di new file mode 100644 index 00000000000..8c549eecdc6 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/StereotypeApplicationObservableList.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/StereotypeApplicationObservableList.notation b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/StereotypeApplicationObservableList.notation new file mode 100644 index 00000000000..bf9abab340f --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/StereotypeApplicationObservableList.notation @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/StereotypeApplicationObservableList.uml b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/StereotypeApplicationObservableList.uml new file mode 100644 index 00000000000..4cdb81aeb67 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/StereotypeApplicationObservableList.uml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_k16l0KlnEemdRud3bBEWMw" name="StereotypeApplicationObservableList"> + <packageImport xmi:type="uml:PackageImport" xmi:id="_k7BIQKlnEemdRud3bBEWMw"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> + <packagedElement xmi:type="uml:Class" xmi:id="_lruMcKlnEemdRud3bBEWMw" name="Class1"/> + <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_pIdZEKlnEemdRud3bBEWMw"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_pIenMKlnEemdRud3bBEWMw" source="http://www.eclipse.org/uml2/2.0.0/UML"> + <references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA"/> + </eAnnotations> + <appliedProfile xmi:type="uml:Profile" href="pathmap://UML_PROFILES/Ecore.profile.uml#_0"/> + </profileApplication> +</uml:Model> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/UMLLabelObservableValue.di b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/UMLLabelObservableValue.di new file mode 100644 index 00000000000..8c549eecdc6 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/UMLLabelObservableValue.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/UMLLabelObservableValue.notation b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/UMLLabelObservableValue.notation new file mode 100644 index 00000000000..bf9abab340f --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/UMLLabelObservableValue.notation @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/UMLLabelObservableValue.uml b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/UMLLabelObservableValue.uml new file mode 100644 index 00000000000..83ed978361c --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/UMLLabelObservableValue.uml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_vtMnkKiaEemnUaUTM2dhVQ" name="UMLLabelObservableValue"> + <packageImport xmi:type="uml:PackageImport" xmi:id="_vxM90KiaEemnUaUTM2dhVQ"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> + <packagedElement xmi:type="uml:Class" xmi:id="_w4cSsKiaEemnUaUTM2dhVQ" name="Class1"/> +</uml:Model> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/UnsettableStringObservableValue.di b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/UnsettableStringObservableValue.di new file mode 100644 index 00000000000..8c549eecdc6 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/UnsettableStringObservableValue.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/UnsettableStringObservableValue.notation b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/UnsettableStringObservableValue.notation new file mode 100644 index 00000000000..bf9abab340f --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/UnsettableStringObservableValue.notation @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/UnsettableStringObservableValue.uml b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/UnsettableStringObservableValue.uml new file mode 100644 index 00000000000..a130b0c3a51 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/model/UnsettableStringObservableValue.uml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_AK3wIKk5EemnUaUTM2dhVQ" name="UnsettableStringObservableValue"> + <packageImport xmi:type="uml:PackageImport" xmi:id="_APSWEKk5EemnUaUTM2dhVQ"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> + <packagedElement xmi:type="uml:Class" xmi:id="_BD8tMKk5EemnUaUTM2dhVQ" name="Class1"/> +</uml:Model> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/org.eclipse.papyrus.uml.properties.tests.launch b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/org.eclipse.papyrus.uml.properties.tests.launch index ff56762e63d..14606a62414 100644 --- a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/org.eclipse.papyrus.uml.properties.tests.launch +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/org.eclipse.papyrus.uml.properties.tests.launch @@ -19,6 +19,14 @@ <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> <listEntry value="1"/> </listAttribute> +<listAttribute key="org.eclipse.eclemma.core.SCOPE_IDS"> +<listEntry value="=org.eclipse.papyrus.infra.gmfdiag.properties/src"/> +<listEntry value="=org.eclipse.papyrus.infra.services.edit.ui/src"/> +<listEntry value="=org.eclipse.papyrus.infra.widgets/src"/> +<listEntry value="=org.eclipse.papyrus.infra.ui.emf/src"/> +<listEntry value="=org.eclipse.papyrus.infra.gmfdiag.common/src"/> +<listEntry value="=org.eclipse.papyrus.uml.properties/src"/> +</listAttribute> <stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/> <booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/> <stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/AbstractElementCustomizationObservableValueTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/AbstractElementCustomizationObservableValueTest.java new file mode 100644 index 00000000000..977e12ff2c9 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/AbstractElementCustomizationObservableValueTest.java @@ -0,0 +1,71 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import static org.junit.Assert.assertNotNull; + +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.gef.EditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.junit.utils.DiagramUtils; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrus.uml.properties.modelelement.UMLNotationModelElement; +import org.eclipse.papyrus.uml.properties.tests.DiagramViewUtils; +import org.junit.Assert; + +/** + * This allows to test the element customization observable value. + */ +@SuppressWarnings({ "nls" }) +@PluginResource("model/ElementCustomizationObservableValue.di") +public abstract class AbstractElementCustomizationObservableValueTest extends AbstractObservableValueTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#initializeContextObject() + */ + @Override + protected Object initializeContextObject() { + Diagram diagram = DiagramUtils.getNotationDiagram(editorFixture.getModelSet(), "Class Diagram"); + assertNotNull(diagram); + + editorFixture.getPageManager().openPage(diagram); + editorFixture.flushDisplayEvents(); + + final View diagramView = DiagramViewUtils.getDiagramView(diagram, "Class1"); + Assert.assertNotNull("The diagram view for 'Class1' cannot be found", diagramView); + + final IGraphicalEditPart semanticEP = DiagramUtils.findEditPartforView(editorFixture.getEditor(), diagramView, IGraphicalEditPart.class); + Assert.assertNotNull("The edit part for 'Class1' cannot be found", semanticEP); + + return semanticEP; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#createModelElement(org.eclipse.emf.edit.domain.EditingDomain, org.eclipse.emf.ecore.EObject) + */ + @Override + protected ModelElement createModelElement(final EditingDomain domain, final Object source) { + return new UMLNotationModelElement((EditPart) source); + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/AbstractImageObservableValueTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/AbstractImageObservableValueTest.java new file mode 100644 index 00000000000..ddee710e1e9 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/AbstractImageObservableValueTest.java @@ -0,0 +1,69 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrus.uml.properties.modelelement.CustomImageModelElement; +import org.eclipse.uml2.uml.Image; +import org.eclipse.uml2.uml.Stereotype; +import org.junit.Assert; + +/** + * This allows to test the image observable value. + */ +@SuppressWarnings({ "nls" }) +@PluginResource("model/ImageObservableValue.di") +public abstract class AbstractImageObservableValueTest extends AbstractUMLObservableValueTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#initializeContextObject() + */ + @Override + protected Object initializeContextObject() { + final Stereotype stereotype = (Stereotype) model.getOwnedMember("Stereotype1"); + Assert.assertNotNull("The stereotype 'Stereotype1' must be available in the model", stereotype); + + final Image image = stereotype.getIcons().get(0); + Assert.assertNotNull("The first image of 'Stereotype1' must be available in the model", image); + + return image; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#createModelElement(org.eclipse.emf.edit.domain.EditingDomain, java.lang.Object) + */ + @Override + protected ModelElement createModelElement(final EditingDomain domain, final Object source) { + return new CustomImageModelElement((Image) source, domain); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableValueTest#expectedValueType() + */ + @Override + protected Object expectedValueType() { + return String.class; + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/AbstractObservableListTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/AbstractObservableListTest.java new file mode 100644 index 00000000000..5fe5e296ff7 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/AbstractObservableListTest.java @@ -0,0 +1,198 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; + +import org.eclipse.core.databinding.observable.IObservable; +import org.eclipse.core.databinding.observable.list.IObservableList; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.junit.Assert; +import org.junit.Test; + +/** + * This allows to define an abstract test class for an observable list. + */ +@SuppressWarnings({ "unchecked", "rawtypes", "serial", "nls" }) +public abstract class AbstractObservableListTest extends AbstractObservableTest { + + /** + * This allows to test the observable list (creation, add, remove, retain and clear). + */ + @Test + public void testObservableList() { + final Object object = getContextObject(); + + // Create the observable + final ModelElement modelElement = createModelElement(domain, object); + final IObservable observable = modelElement.getObservable(getPropertyPath()); + Assert.assertTrue("The created observable must be an IObservableList", observable instanceof IObservableList); + + final IObservableList observableList = (IObservableList) observable; + + // Test the initial value and value type + checkInitialList(observableList); + + if (canModify()) { + boolean testAdd = testAdd(); + boolean testRemove = testRemove(); + boolean testAddAll = testAddAll(); + boolean testRemoveAll = testRemoveAll(); + boolean testRetainAll = testRetainAll(); + boolean testClear = testClear(); + + if (testAdd) { + // Add an item + observableList.add(expectedValueToSet()); + checkModifiedList(observableList); + } + + if (testRemove && testAdd) { + // Remove the added element + observableList.remove(expectedValueToSet()); + checkInitialList(observableList); + } + + if (testAddAll) { + // Try the addAll (even if there is only one element in the list) + observableList.addAll(new ArrayList(1) { + { + add(expectedValueToSet()); + } + }); + checkModifiedList(observableList); + } + + if (testRemoveAll && (testAddAll || testAdd)) { + if (!testAddAll) { + // Add an item + observableList.add(expectedValueToSet()); + checkModifiedList(observableList); + } + // Try to remove the added element with removeAll (even if there is only element in the list) + observableList.removeAll(Collections.singletonList(expectedValueToSet())); + checkInitialList(observableList); + } + + if (testRetainAll) { + // Set a new value and test it + observableList.add(expectedValueToSet()); + checkModifiedList(observableList); + + // Add an element to test the retain method + observableList.add(expectedValueToSet()); + observableList.retainAll((Collection) expectedBeforeValue()); + checkInitialList(observableList); + } + + if (testClear) { + // Try to clear the list + observableList.clear(); + checkClearedList(observableList); + } + } + } + + /** + * This allows to check the list at the initial state. + * + * @param observableList + * The current observable list. + */ + protected void checkInitialList(final IObservableList observableList) { + final Object initialValue = expectedBeforeValue(); + Assert.assertTrue("The expected initial value must be a collection", initialValue instanceof Collection); + Assert.assertTrue("The initial list is not the expected one", observableList.containsAll((Collection) initialValue)); + } + + /** + * This allows to check the list when it was modified. + * + * @param observableList + * The current observable list. + */ + protected void checkModifiedList(final IObservableList observableList) { + final Object modifiedValue = expectedAfterValue(); + Assert.assertTrue("The expected modified value must be a collection", modifiedValue instanceof Collection); + Assert.assertTrue("The modified list is not the expected one", observableList.containsAll((Collection) modifiedValue)); + } + + /** + * This allows to check the list when it was cleared. + * + * @param observableList + * The current observable list. + */ + protected void checkClearedList(final IObservableList observableList) { + Assert.assertEquals("The cleared list must be empty", 0, observableList.size()); + } + + /** + * This allows to define if this is needed to test the 'add' method. + * + * @return <code>true</code> if the 'add' should be tested, <code>false</code> otherwise. + */ + protected boolean testAdd() { + return true; + } + + /** + * This allows to define if this is needed to test the 'remove' method. + * + * @return <code>true</code> if the 'remove' should be tested, <code>false</code> otherwise. + */ + protected boolean testRemove() { + return true; + } + + /** + * This allows to define if this is needed to test the 'addAll' method. + * + * @return <code>true</code> if the 'addAll' should be tested, <code>false</code> otherwise. + */ + protected boolean testAddAll() { + return true; + } + + /** + * This allows to define if this is needed to test the 'removeAll' method. + * + * @return <code>true</code> if the 'removeAll' should be tested, <code>false</code> otherwise. + */ + protected boolean testRemoveAll() { + return true; + } + + /** + * This allows to define if this is needed to test the 'retainAll' method. + * + * @return <code>true</code> if the 'retainAll' should be tested, <code>false</code> otherwise. + */ + protected boolean testRetainAll() { + return true; + } + + /** + * This allows to define if this is needed to test the 'clear' method. + * + * @return <code>true</code> if the 'clear' should be tested, <code>false</code> otherwise. + */ + protected boolean testClear() { + return true; + } +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/AbstractObservableTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/AbstractObservableTest.java new file mode 100644 index 00000000000..ae4f5fa27f5 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/AbstractObservableTest.java @@ -0,0 +1,124 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest; +import org.eclipse.papyrus.junit.utils.rules.PapyrusEditorFixture; +import org.junit.Before; +import org.junit.Rule; + +/** + * This allows to define an abstract test class for an observable (value or list). + */ +@SuppressWarnings({ "nls" }) +public abstract class AbstractObservableTest extends AbstractPapyrusTest { + + /** + * The editor fixture to manage the opening model. + */ + @Rule + public final PapyrusEditorFixture editorFixture = new PapyrusEditorFixture(); + + /** + * The editing domain. + */ + protected EditingDomain domain = null; + + /** + * The context object (object selected for the properties view in functional manuel tests). + */ + protected Object contextObject = null; + + /** + * This allows to set the variables needed for the test. + */ + @Before + public void setup() { + domain = editorFixture.getEditingDomain(); + } + + /** + * This allows to define if the property can be modified or not. + * By default, return <code>true</code>. + * + * @return <code>true</code> if the values can be set, <code>false</code> otherwise. + */ + protected boolean canModify() { + return true; + } + + /** + * Get the context object to modify. + * + * @return The context object to modify. + */ + protected Object getContextObject() { + // If the context is not defined, initialize it + if (null == contextObject) { + contextObject = initializeContextObject(); + } + return contextObject; + } + + /** + * This allows to initialize the context object. + * + * @return The context object to modify. + */ + protected abstract Object initializeContextObject(); + + /** + * This allows to create the model element which allows to get the observable value depending to the property path. + * + * @param domain + * The editing domain. + * @param source + * The source for the model element. + * @return The created model element. + */ + protected abstract ModelElement createModelElement(final EditingDomain domain, final Object source); + + /** + * The property path needed to get the correct observable value from the model element. + * + * @return The property path. + */ + protected abstract String getPropertyPath(); + + /** + * Define the expected initial value. + * + * @return The expected initial value. + */ + protected abstract Object expectedBeforeValue(); + + /** + * Define the expected modified value. + * + * @return The expected modified value. + */ + protected abstract Object expectedAfterValue(); + + /** + * Define the value to set. + * + * @return The value to set. + */ + protected abstract Object expectedValueToSet(); + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/AbstractObservableValueTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/AbstractObservableValueTest.java new file mode 100644 index 00000000000..0e67a1cb573 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/AbstractObservableValueTest.java @@ -0,0 +1,103 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import org.eclipse.core.databinding.observable.IObservable; +import org.eclipse.core.databinding.observable.value.IObservableValue; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.junit.Assert; +import org.junit.Test; + +/** + * This allows to define an abstract test class for an observable value. + */ +@SuppressWarnings({ "unchecked", "rawtypes", "nls" }) +public abstract class AbstractObservableValueTest extends AbstractObservableTest { + + /** + * This allows to test the observable value (creation, getValue and setValue). + */ + @Test + public void testObservableValue() { + final Object object = getContextObject(); + + // Create the observable + final ModelElement modelElement = createModelElement(domain, object); + final IObservable observable = modelElement.getObservable(getPropertyPath()); + Assert.assertTrue("The created observable must be an IObservableValue", observable instanceof IObservableValue); + + final IObservableValue observableValue = (IObservableValue) observable; + + Assert.assertEquals("The initial value type is not the expected one", expectedValueType(), observableValue.getValueType()); + + // Test the initial value and value type + checkInitialValue(observableValue); + + if (canModify()) { + // Set a new value and test it + observableValue.setValue(expectedValueToSet()); + checkModifiedValue(observableValue); + + if (testUndo()) { + // Test the undo + domain.getCommandStack().undo(); + checkInitialValue(observableValue); + + // Test the redo + domain.getCommandStack().redo(); + checkModifiedValue(observableValue); + } + } + } + + /** + * Define if the undo/redo should be tested. + * By default, return <code>true</code>. + * + * @return <code>true</code> if the undo should be tested, <code>false</code> otherwise. + */ + protected boolean testUndo() { + return true; + } + + /** + * This allows to check the value at the initial state. + * + * @param observableValue + * The current observable value. + */ + protected void checkInitialValue(final IObservableValue observableValue) { + Assert.assertEquals("The initial value is not the expected one", expectedBeforeValue(), observableValue.getValue()); + } + + /** + * This allows to check the value when it was modified. + * + * @param observableValue + * The current observable value. + */ + protected void checkModifiedValue(final IObservableValue observableValue) { + Assert.assertEquals("The modified value is not the expected one", expectedAfterValue(), observableValue.getValue()); + } + + /** + * Define the expected value type of the observable value. + * + * @return The expected value type. + */ + protected abstract Object expectedValueType(); + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/AbstractUMLObservableListTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/AbstractUMLObservableListTest.java new file mode 100644 index 00000000000..c49cad46fb9 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/AbstractUMLObservableListTest.java @@ -0,0 +1,41 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import org.eclipse.uml2.uml.Model; + +/** + * This allows to define an abstract test class for an observable list with UML. + */ +public abstract class AbstractUMLObservableListTest extends AbstractObservableListTest { + + /** + * The model. + */ + protected Model model = null; + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#setup() + */ + @Override + public void setup() { + super.setup(); + model = (Model) editorFixture.getModel(); + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/AbstractUMLObservableValueTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/AbstractUMLObservableValueTest.java new file mode 100644 index 00000000000..9d747a12b12 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/AbstractUMLObservableValueTest.java @@ -0,0 +1,41 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import org.eclipse.uml2.uml.Model; + +/** + * This allows to define an abstract test class for an observable value with UML. + */ +public abstract class AbstractUMLObservableValueTest extends AbstractObservableValueTest { + + /** + * The model. + */ + protected Model model = null; + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#setup() + */ + @Override + public void setup() { + super.setup(); + model = (Model) editorFixture.getModel(); + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/AnnotationObservableValueTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/AnnotationObservableValueTest.java new file mode 100644 index 00000000000..eb8f8bb56a2 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/AnnotationObservableValueTest.java @@ -0,0 +1,106 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import org.eclipse.emf.ecore.EModelElement; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.papyrus.infra.properties.ui.modelelement.AnnotationModelElement; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.uml2.uml.Class; +import org.junit.Assert; + +/** + * This allows to test the annotation observable value. + */ +@SuppressWarnings({ "nls" }) +@PluginResource("model/AnnotationObservableValue.di") +public class AnnotationObservableValueTest extends AbstractUMLObservableValueTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#initializeContextObject() + */ + @Override + protected Object initializeContextObject() { + final Class existingClass = (Class) model.getOwnedMember("Class1"); + Assert.assertNotNull("The class 'Class1' must be available in the model", existingClass); + + return existingClass; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#createModelElement(org.eclipse.emf.edit.domain.EditingDomain, java.lang.Object) + */ + @Override + protected ModelElement createModelElement(final EditingDomain domain, final Object source) { + return new AnnotationModelElement((EModelElement) source, domain, "annotationName"); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return ""; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return null; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableValueTest#expectedValueType() + */ + @Override + protected Object expectedValueType() { + return String.class; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + return "testValue"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + return "testValue"; + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/AppliedCommentsObservableListTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/AppliedCommentsObservableListTest.java new file mode 100644 index 00000000000..442cbe4374a --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/AppliedCommentsObservableListTest.java @@ -0,0 +1,146 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import java.util.ArrayList; +import java.util.Collections; + +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrus.uml.properties.modelelement.CommentModelElement; +import org.eclipse.uml2.uml.Class; +import org.eclipse.uml2.uml.Comment; +import org.eclipse.uml2.uml.Element; +import org.junit.Assert; + +/** + * This allows to test the applied comments observable list. + */ +@SuppressWarnings({ "serial", "nls" }) +@PluginResource("model/AppliedCommentsObservableList.di") +public class AppliedCommentsObservableListTest extends AbstractUMLObservableListTest { + + /** + * The existing comment to add to the existing class. + */ + protected Comment existingComment = null; + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#initializeContextObject() + */ + @Override + protected Object initializeContextObject() { + final Class existingClass = (Class) model.getOwnedMember("Class1"); + Assert.assertNotNull("The class 'Class1' must be available in the model", existingClass); + + return existingClass; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#createModelElement(org.eclipse.emf.edit.domain.EditingDomain, java.lang.Object) + */ + @Override + protected ModelElement createModelElement(final EditingDomain domain, final Object source) { + return new CommentModelElement((Element) source, domain); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return "appliedComments"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return Collections.EMPTY_LIST; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + if (null != existingComment) { + return new ArrayList<Comment>() { + { + add(existingComment); + } + }; + } + return Collections.EMPTY_LIST; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + if (null == existingComment) { + existingComment = model.getOwnedComments().get(0); + Assert.assertNotNull("A comment should exist in the model", existingComment); + } + return existingComment; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableListTest#testAddAll() + */ + @Override + protected boolean testAddAll() { + return false; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableListTest#testRetainAll() + */ + @Override + protected boolean testRetainAll() { + return false; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableListTest#testClear() + */ + @Override + protected boolean testClear() { + return false; + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/BasicObservableListTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/BasicObservableListTest.java new file mode 100644 index 00000000000..32e34e8cc3a --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/BasicObservableListTest.java @@ -0,0 +1,116 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import java.util.Collections; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrus.uml.properties.modelelement.UMLModelElement; +import org.eclipse.uml2.uml.Class; +import org.eclipse.uml2.uml.OpaqueBehavior; +import org.eclipse.uml2.uml.Operation; +import org.junit.Assert; + +/** + * This allows to test the owned comments observable list. + */ +@SuppressWarnings({ "nls" }) +@PluginResource("model/BasicObservableList.di") +public class BasicObservableListTest extends AbstractUMLObservableListTest { + + /** + * The existing comment to add to the existing class. + */ + protected OpaqueBehavior existingOpaqueBehavior = null; + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#initializeContextObject() + */ + @Override + protected Object initializeContextObject() { + final Class existingClass = (Class) model.getOwnedMember("Class1"); + Assert.assertNotNull("The class 'Class1' must be available in the model", existingClass); + + final Operation operation = (Operation) existingClass.getOwnedMember("Operation1"); + Assert.assertNotNull("The operation 'Operation1' must be available in the model", operation); + + return operation; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#createModelElement(org.eclipse.emf.edit.domain.EditingDomain, java.lang.Object) + */ + @Override + protected ModelElement createModelElement(final EditingDomain domain, final Object source) { + return new UMLModelElement((EObject) source, domain); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return "method"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return Collections.EMPTY_LIST; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + if (null != existingOpaqueBehavior) { + Collections.singletonList(existingOpaqueBehavior); + } + return Collections.EMPTY_LIST; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + if (null == existingOpaqueBehavior) { + final Class existingClass = (Class) model.getOwnedMember("Class1"); + existingOpaqueBehavior = (OpaqueBehavior) existingClass.getOwnedMember("OpaqueBehavior1"); + Assert.assertNotNull("An OpaqueBehavior should exist in the model", existingOpaqueBehavior); + } + return existingOpaqueBehavior; + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/BasicObservableValueTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/BasicObservableValueTest.java new file mode 100644 index 00000000000..5b1b633b431 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/BasicObservableValueTest.java @@ -0,0 +1,107 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrus.uml.properties.modelelement.UMLModelElement; +import org.eclipse.uml2.uml.Package; +import org.eclipse.uml2.uml.UMLPackage; +import org.junit.Assert; + +/** + * This allows to test the basic observable value (PapyrusObservableValue). + */ +@SuppressWarnings({ "nls" }) +@PluginResource("model/BasicObservableValue.di") +public class BasicObservableValueTest extends AbstractUMLObservableValueTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#initializeContextObject() + */ + @Override + protected Object initializeContextObject() { + final Package pckg = (Package) model.getOwnedMember("Package1"); + Assert.assertNotNull("The package 'Package1' must be available in the model", pckg); + + return pckg; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#createModelElement(org.eclipse.emf.edit.domain.EditingDomain, java.lang.Object) + */ + @Override + protected ModelElement createModelElement(final EditingDomain domain, final Object source) { + return new UMLModelElement((EObject) source, domain); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return "URI"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return ""; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableValueTest#expectedValueType() + */ + @Override + protected Object expectedValueType() { + return UMLPackage.eINSTANCE.getPackage_URI(); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + return "http://www.eclipse.org/testURI"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + return "http://www.eclipse.org/testURI"; + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ElementCustomizationElementIconObservableValueTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ElementCustomizationElementIconObservableValueTest.java new file mode 100644 index 00000000000..d0057fa4f85 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ElementCustomizationElementIconObservableValueTest.java @@ -0,0 +1,76 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import org.eclipse.papyrus.uml.properties.modelelement.UMLNotationModelElement; + +/** + * This allows to test the element customization element icon observable value. + */ +@SuppressWarnings({ "nls" }) +public class ElementCustomizationElementIconObservableValueTest extends AbstractElementCustomizationObservableValueTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return UMLNotationModelElement.ElementIcon; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return true; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + return false; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + return false; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableValueTest#expectedValueType() + */ + @Override + protected Object expectedValueType() { + return Boolean.class; + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ElementCustomizationQualifiedNameObservableValueTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ElementCustomizationQualifiedNameObservableValueTest.java new file mode 100644 index 00000000000..48e84daa84c --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ElementCustomizationQualifiedNameObservableValueTest.java @@ -0,0 +1,76 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import org.eclipse.papyrus.uml.properties.modelelement.UMLNotationModelElement; + +/** + * This allows to test the element customization element icon observable value. + */ +@SuppressWarnings({ "nls" }) +public class ElementCustomizationQualifiedNameObservableValueTest extends AbstractElementCustomizationObservableValueTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return UMLNotationModelElement.QualifiedName; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return 1000; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + return 1; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + return 1; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableValueTest#expectedValueType() + */ + @Override + protected Object expectedValueType() { + return Integer.class; + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ElementCustomizationShadowObservableValueTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ElementCustomizationShadowObservableValueTest.java new file mode 100644 index 00000000000..0b320e492ca --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ElementCustomizationShadowObservableValueTest.java @@ -0,0 +1,76 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import org.eclipse.papyrus.uml.properties.modelelement.UMLNotationModelElement; + +/** + * This allows to test the element customization element icon observable value. + */ +@SuppressWarnings({ "nls" }) +public class ElementCustomizationShadowObservableValueTest extends AbstractElementCustomizationObservableValueTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return UMLNotationModelElement.Shadow; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return false; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + return true; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + return true; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableValueTest#expectedValueType() + */ + @Override + protected Object expectedValueType() { + return Boolean.class; + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ExtensionEndMultiplicityObservableValueTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ExtensionEndMultiplicityObservableValueTest.java new file mode 100644 index 00000000000..c6f6217e042 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ExtensionEndMultiplicityObservableValueTest.java @@ -0,0 +1,111 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrus.uml.properties.modelelement.MemberEndModelElement; +import org.eclipse.papyrus.uml.tools.util.MultiplicityParser; +import org.eclipse.uml2.uml.Activity; +import org.eclipse.uml2.uml.Property; +import org.junit.Assert; + +/** + * This allows to test the multiplicity observable value for the ExtensionEnd element. + */ +@SuppressWarnings({ "nls" }) +@PluginResource("model/ExtensionEndMultiplicityObservableValue.di") +public class ExtensionEndMultiplicityObservableValueTest extends AbstractUMLObservableValueTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#initializeContextObject() + */ + @Override + protected Object initializeContextObject() { + final Activity activity = (Activity) model.getPackagedElement("Activity1"); + Assert.assertNotNull("The activity 'Activity1' must be available in the model", activity); + + final Property extensionEnd = activity.getOwnedAttributes().stream().filter(p -> "ExtensionEnd1".equals(p.getName())).findFirst().get(); + Assert.assertNotNull("The extension end 'ExtensionEnd1' must be available in the activity 'Activity1'", extensionEnd); + + return extensionEnd; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#createModelElement(org.eclipse.emf.edit.domain.EditingDomain, java.lang.Object) + */ + @Override + protected ModelElement createModelElement(final EditingDomain domain, final Object source) { + return new MemberEndModelElement((EObject) source, domain); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return MemberEndModelElement.MULTIPLICITY; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return "0..1"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableValueTest#expectedValueType() + */ + @Override + protected Object expectedValueType() { + return String.class; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + return MultiplicityParser.OPTIONAL; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + return MultiplicityParser.OPTIONAL; + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ExtensionRequiredObservableValueTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ExtensionRequiredObservableValueTest.java new file mode 100644 index 00000000000..3778942de92 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ExtensionRequiredObservableValueTest.java @@ -0,0 +1,122 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrus.uml.properties.modelelement.UMLModelElement; +import org.eclipse.uml2.uml.Extension; +import org.eclipse.uml2.uml.Profile; +import org.junit.Assert; + +/** + * This allows to test the extension required observable value. + */ +@SuppressWarnings({ "nls" }) +@PluginResource("model/ExtensionRequiredObservableValue.di") +public class ExtensionRequiredObservableValueTest extends AbstractObservableValueTest { + + /** + * The model. + */ + protected Profile profile = null; + + /** + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#setup() + * + */ + @Override + public void setup() { + super.setup(); + profile = (Profile) editorFixture.getRoot(); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#initializeContextObject() + */ + @Override + protected Object initializeContextObject() { + final Extension extension = (Extension) profile.getPackagedElement("Extension1"); + Assert.assertNotNull("The extension 'Extension1' must be available in the model", extension); + + return extension; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#createModelElement(org.eclipse.emf.edit.domain.EditingDomain, java.lang.Object) + */ + @Override + protected ModelElement createModelElement(final EditingDomain domain, final Object source) { + return new UMLModelElement((EObject) source, domain); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return "isRequired"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return false; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableValueTest#expectedValueType() + */ + @Override + protected Object expectedValueType() { + return Boolean.class; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + return true; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + return true; + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ImageExpressionObservableValueTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ImageExpressionObservableValueTest.java new file mode 100644 index 00000000000..fe1f9af8e53 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ImageExpressionObservableValueTest.java @@ -0,0 +1,66 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import org.eclipse.papyrus.uml.properties.modelelement.CustomImageModelElement; + +/** + * This allows to test the image expression observable value. + */ +@SuppressWarnings({ "nls" }) +public class ImageExpressionObservableValueTest extends AbstractImageObservableValueTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return CustomImageModelElement.EXPRESSION; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return null; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + return "MyImageExpression"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + return "MyImageExpression"; + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ImageKindObservableValueTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ImageKindObservableValueTest.java new file mode 100644 index 00000000000..4553ac5a401 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ImageKindObservableValueTest.java @@ -0,0 +1,66 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import org.eclipse.papyrus.uml.properties.modelelement.CustomImageModelElement; + +/** + * This allows to test the image kind observable value. + */ +@SuppressWarnings({ "nls" }) +public class ImageKindObservableValueTest extends AbstractImageObservableValueTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return CustomImageModelElement.KIND; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return null; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + return "icon"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + return "icon"; + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ImageNameObservableValueTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ImageNameObservableValueTest.java new file mode 100644 index 00000000000..9ef5b561a52 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ImageNameObservableValueTest.java @@ -0,0 +1,66 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import org.eclipse.papyrus.uml.properties.modelelement.CustomImageModelElement; + +/** + * This allows to test the image name observable value. + */ +@SuppressWarnings({ "nls" }) +public class ImageNameObservableValueTest extends AbstractImageObservableValueTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return CustomImageModelElement.NAME; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return "Image1"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + return "MyImageName"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + return "MyImageName"; + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ImportedPackageLocationObservableValueTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ImportedPackageLocationObservableValueTest.java new file mode 100644 index 00000000000..e569d8a8656 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ImportedPackageLocationObservableValueTest.java @@ -0,0 +1,120 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrus.uml.properties.modelelement.ImportedPackageModelElement; +import org.eclipse.uml2.uml.Package; +import org.eclipse.uml2.uml.PackageImport; +import org.junit.Assert; + +/** + * This allows to test the imported package location observable value. + */ +@SuppressWarnings({ "nls" }) +@PluginResource("model/ImportedPackageLocationObservableValue.di") +public class ImportedPackageLocationObservableValueTest extends AbstractUMLObservableValueTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#initializeContextObject() + */ + @Override + protected Object initializeContextObject() { + final PackageImport packageImport = (PackageImport) model.getPackageImports().get(0); + Assert.assertNotNull("The model must contains package import", packageImport); + + final Package pckg = packageImport.getImportedPackage(); + Assert.assertNotNull("The imported package must not be null", pckg); + + return pckg; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#createModelElement(org.eclipse.emf.edit.domain.EditingDomain, java.lang.Object) + */ + @Override + protected ModelElement createModelElement(final EditingDomain domain, final Object source) { + return new ImportedPackageModelElement((EObject) source, domain); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return "location"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return "pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml"; + } + + /** + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#canModify() + * + * @return + */ + @Override + protected boolean canModify() { + return false; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableValueTest#expectedValueType() + */ + @Override + protected Object expectedValueType() { + return String.class; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + return null; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + return null; + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/KeywordObservableValueTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/KeywordObservableValueTest.java new file mode 100644 index 00000000000..4b263310a57 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/KeywordObservableValueTest.java @@ -0,0 +1,108 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.papyrus.infra.internationalization.utils.utils.InternationalizationConstants; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrus.uml.properties.modelelement.UMLModelElement; +import org.eclipse.uml2.uml.Stereotype; +import org.eclipse.uml2.uml.UMLPackage; +import org.junit.Assert; + +/** + * This allows to test the keyword observable value. + */ +@SuppressWarnings({ "nls" }) +@PluginResource("model/KeywordObservableValue.di") +public class KeywordObservableValueTest extends AbstractUMLObservableValueTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#initializeContextObject() + */ + @Override + protected Object initializeContextObject() { + final Stereotype stereotype = (Stereotype) model.getOwnedMember("Stereotype1"); + Assert.assertNotNull("The stereotype 'Stereotype1' must be available in the model", stereotype); + + return stereotype; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#createModelElement(org.eclipse.emf.edit.domain.EditingDomain, java.lang.Object) + */ + @Override + protected ModelElement createModelElement(final EditingDomain domain, final Object source) { + return new UMLModelElement((EObject) source, domain); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return InternationalizationConstants.KEYWORD_PROPERTY_PATH; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return null; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableValueTest#expectedValueType() + */ + @Override + protected Object expectedValueType() { + return UMLPackage.eINSTANCE.getNamedElement__GetLabel(); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + return "MyStereotypeKeyword"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + return "MyStereotypeKeyword"; + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/MaskValueObservableListTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/MaskValueObservableListTest.java new file mode 100644 index 00000000000..eb862e994cc --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/MaskValueObservableListTest.java @@ -0,0 +1,139 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import static org.junit.Assert.assertNotNull; + +import java.util.ArrayList; +import java.util.stream.Stream; + +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.gef.EditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.notation.BasicCompartment; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.junit.utils.DiagramUtils; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrus.uml.properties.modelelement.UMLNotationModelElement; +import org.eclipse.papyrus.uml.properties.tests.DiagramViewUtils; +import org.junit.Assert; + +/** + * This allows to test the mask value observable list. + */ +@SuppressWarnings({ "unchecked", "serial", "nls" }) +@PluginResource("model/MaskValueObservableList.di") +public class MaskValueObservableListTest extends AbstractUMLObservableListTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#initializeContextObject() + */ + @Override + protected Object initializeContextObject() { + Diagram diagram = DiagramUtils.getNotationDiagram(editorFixture.getModelSet(), "Class Diagram"); + assertNotNull(diagram); + + editorFixture.getPageManager().openPage(diagram); + editorFixture.flushDisplayEvents(); + + final View diagramView = DiagramViewUtils.getDiagramView(diagram, "Class1"); + Assert.assertNotNull("The diagram view for 'Class1' cannot be found", diagramView); + + final Stream<BasicCompartment> compartments = diagramView.getChildren().stream().filter(BasicCompartment.class::isInstance).map(BasicCompartment.class::cast); + final BasicCompartment attributeCompartment = compartments.filter(child -> "Class_AttributeCompartment".equals(child.getType())).findFirst().get(); + Assert.assertNotNull("The attribute compartment of 'Class1' cannot be found", attributeCompartment); + + final View propertyView = !attributeCompartment.getChildren().isEmpty() ? (View) attributeCompartment.getChildren().get(0) : null; + Assert.assertNotNull("The view of property 'Property1' cannot be found", propertyView); + + final IGraphicalEditPart propertyEP = DiagramUtils.findEditPartforView(editorFixture.getEditor(), propertyView, IGraphicalEditPart.class); + Assert.assertNotNull("The edit part for 'Property1' cannot be found", propertyEP); + + return propertyEP; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#createModelElement(org.eclipse.emf.edit.domain.EditingDomain, java.lang.Object) + */ + @Override + protected ModelElement createModelElement(final EditingDomain domain, final Object source) { + return new UMLNotationModelElement((EditPart) source); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return UMLNotationModelElement.LabelCustomization; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return new ArrayList<String>() { + { + add("multiplicity"); + add("visibility"); + add("name"); + add("type"); + add("derived"); + } + }; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + return new ArrayList<String>() { + { + add("multiplicity"); + add("visibility"); + add("name"); + add("type"); + add("derived"); + add("defaultValue"); + } + }; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + return "defaultValue"; + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/MultiplicityObservableValueTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/MultiplicityObservableValueTest.java new file mode 100644 index 00000000000..bb14010587d --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/MultiplicityObservableValueTest.java @@ -0,0 +1,186 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import org.eclipse.core.databinding.observable.value.IObservableValue; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.papyrus.infra.gmfdiag.common.databinding.GMFObservableValue; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrus.uml.properties.databinding.MultiplicityObservableValue; +import org.eclipse.papyrus.uml.properties.modelelement.MemberEndModelElement; +import org.eclipse.uml2.uml.Class; +import org.eclipse.uml2.uml.LiteralInteger; +import org.eclipse.uml2.uml.LiteralUnlimitedNatural; +import org.eclipse.uml2.uml.Property; +import org.eclipse.uml2.uml.UMLPackage; +import org.junit.Assert; + +/** + * This allows to test the multiplicity observable value. + */ +@SuppressWarnings({ "unchecked", "rawtypes", "nls" }) +@PluginResource("model/MultiplicityObservableValue.di") +public class MultiplicityObservableValueTest extends AbstractUMLObservableValueTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#initializeContextObject() + */ + @Override + protected Object initializeContextObject() { + final Class existingClass = (Class) model.getOwnedMember("Class1"); + Assert.assertNotNull("The class 'Class1' must be available in the model", existingClass); + + final Property existingProperty = existingClass.getOwnedAttributes().stream().filter(p -> "Property1".equals(p.getName())).findFirst().get(); + Assert.assertNotNull("The property 'Property1' must be available in the class 'Class1'", existingClass); + + return existingProperty; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#createModelElement(org.eclipse.emf.edit.domain.EditingDomain, java.lang.Object) + */ + @Override + protected ModelElement createModelElement(final EditingDomain domain, final Object source) { + return new MemberEndModelElement((EObject) source, domain); + } + + /** + * We need to re-implement the check of the initial value because the observable value for multiplicity is different. + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#checkInitialValue(org.eclipse.core.databinding.observable.value.IObservableValue) + */ + @Override + protected void checkInitialValue(final IObservableValue observableValue) { + final Object value = observableValue.getValue(); + Assert.assertTrue("The value must be a list of observable values", value instanceof List); + Assert.assertEquals("The list of observable values must be equals to 3", 3, ((Collection) value).size()); + + final Object firstObservableValue = ((List) value).get(0); + Assert.assertTrue("The first observable value must be the multiplicity observable value", firstObservableValue instanceof MultiplicityObservableValue); + Assert.assertEquals("The initial value type of first observable value is not the expected one", String.class, ((MultiplicityObservableValue) firstObservableValue).getValueType()); + Assert.assertEquals("The initial value of first observable value is not the expected one", expectedBeforeValue(), ((MultiplicityObservableValue) firstObservableValue).getValue()); + + final Object secondObservableValue = ((List) value).get(1); + Assert.assertTrue("The second observable value must be the multiplicity observable value", secondObservableValue instanceof IObservableValue); + Assert.assertEquals("The initial value type of second observable value is not the expected one", UMLPackage.eINSTANCE.getMultiplicityElement_LowerValue(), ((IObservableValue) secondObservableValue).getValueType()); + Assert.assertEquals("The initial value of second observable value is not the expected one", null, ((IObservableValue) secondObservableValue).getValue()); + + final Object thirdObservableValue = ((List) value).get(2); + Assert.assertTrue("The third observable value must be the multiplicity observable value", thirdObservableValue instanceof IObservableValue); + Assert.assertEquals("The initial value type of third observable value is not the expected one", UMLPackage.eINSTANCE.getMultiplicityElement_UpperValue(), ((IObservableValue) thirdObservableValue).getValueType()); + Assert.assertEquals("The initial value of third observable value is not the expected one", null, ((IObservableValue) thirdObservableValue).getValue()); + } + + /** + * We need to re-implement the check of the modified value because the observable value for multiplicity is different. + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#checkModifiedValue(org.eclipse.core.databinding.observable.value.IObservableValue) + */ + @Override + protected void checkModifiedValue(final IObservableValue observableValue) { + final Object value = observableValue.getValue(); + Assert.assertTrue("The value must be a list of observable values", value instanceof List); + Assert.assertEquals("The size of the list of observable values is not the correct one", 3, ((Collection) value).size()); + + final Object firstObservableValue = ((List) value).get(0); + Assert.assertTrue("The first observable value must be the multiplicity observable value", firstObservableValue instanceof MultiplicityObservableValue); + Assert.assertEquals("The modified value type of first observable value is not the expected one", String.class, ((MultiplicityObservableValue) firstObservableValue).getValueType()); + Assert.assertEquals("The modified value of first observable value is not the expected one", expectedAfterValue(), ((MultiplicityObservableValue) firstObservableValue).getValue()); + + final Object secondObservableValue = ((List) value).get(1); + Assert.assertTrue("The second observable value must be the multiplicity observable value", secondObservableValue instanceof IObservableValue); + Assert.assertEquals("The modified value type of second observable value is not the expected one", UMLPackage.eINSTANCE.getMultiplicityElement_LowerValue(), ((IObservableValue) secondObservableValue).getValueType()); + final Object secondValue = ((IObservableValue) secondObservableValue).getValue(); + Assert.assertTrue("The modified value of second observable value is not the expected one", secondValue instanceof LiteralInteger); + Assert.assertEquals("The modified value of second observable value is not the expected one", 0, ((LiteralInteger) secondValue).getValue()); + + final Object thirdObservableValue = ((List) value).get(2); + Assert.assertTrue("The third observable value must be the multiplicity observable value", thirdObservableValue instanceof IObservableValue); + Assert.assertEquals("The modified value type of third observable value is not the expected one", UMLPackage.eINSTANCE.getMultiplicityElement_UpperValue(), ((IObservableValue) thirdObservableValue).getValueType()); + final Object thirdValue = ((IObservableValue) thirdObservableValue).getValue(); + Assert.assertTrue("The modified value of third observable value is not the expected one", thirdValue instanceof LiteralUnlimitedNatural); + Assert.assertEquals("The modified value of third observable value is not the expected one", 2, ((LiteralUnlimitedNatural) thirdValue).getValue()); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return MemberEndModelElement.MULTIPLICITY; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return "1"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableValueTest#expectedValueType() + */ + @Override + protected Object expectedValueType() { + return null; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + return "0..2"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + final List<IObservableValue> values = new ArrayList<IObservableValue>(3); + IObservableValue multiplicityObservableValue = new MultiplicityObservableValue((EObject) getContextObject(), domain); + multiplicityObservableValue.setValue(expectedAfterValue()); + values.add(multiplicityObservableValue); + values.add(new GMFObservableValue((EObject) getContextObject(), UMLPackage.eINSTANCE.getMultiplicityElement_LowerValue(), domain)); + values.add(new GMFObservableValue((EObject) getContextObject(), UMLPackage.eINSTANCE.getMultiplicityElement_UpperValue(), domain)); + return values; + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/NavigationObservableValueTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/NavigationObservableValueTest.java new file mode 100644 index 00000000000..ea029ba59a7 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/NavigationObservableValueTest.java @@ -0,0 +1,110 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrus.uml.properties.modelelement.MemberEndModelElement; +import org.eclipse.uml2.uml.Association; +import org.eclipse.uml2.uml.Property; +import org.junit.Assert; + +/** + * This allows to test the navigation observable value. + */ +@SuppressWarnings({ "nls" }) +@PluginResource("model/NavigationObservableValue.di") +public class NavigationObservableValueTest extends AbstractUMLObservableValueTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#initializeContextObject() + */ + @Override + protected Object initializeContextObject() { + final Association association = (Association) model.getOwnedMember("Association1"); + Assert.assertNotNull("The association 'Association1' must be available in the model", association); + + final Property property = association.getOwnedEnds().get(0); + Assert.assertNotNull("The first property of 'Association1' must be available in the model", property); + + return property; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#createModelElement(org.eclipse.emf.edit.domain.EditingDomain, java.lang.Object) + */ + @Override + protected ModelElement createModelElement(final EditingDomain domain, final Object source) { + return new MemberEndModelElement((EObject) source, domain); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return MemberEndModelElement.NAVIGABLE; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return false; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableValueTest#expectedValueType() + */ + @Override + protected Object expectedValueType() { + return Boolean.class; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + return true; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + return true; + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/OwnedCommentsObservableListTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/OwnedCommentsObservableListTest.java new file mode 100644 index 00000000000..cb7d84d2de7 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/OwnedCommentsObservableListTest.java @@ -0,0 +1,151 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import java.util.Collections; + +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrus.uml.properties.modelelement.CommentModelElement; +import org.eclipse.uml2.uml.Comment; +import org.eclipse.uml2.uml.Element; +import org.eclipse.uml2.uml.Package; +import org.junit.Assert; + +/** + * This allows to test the owned comments observable list. + */ +@SuppressWarnings({ "nls" }) +@PluginResource("model/OwnedCommentsObservableList.di") +public class OwnedCommentsObservableListTest extends AbstractUMLObservableListTest { + + /** + * The existing comment to add to the existing class. + */ + protected Comment existingComment = null; + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#initializeContextObject() + */ + @Override + protected Object initializeContextObject() { + final Package existingPackage = (Package) model.getOwnedMember("Package1"); + Assert.assertNotNull("The package 'Package1' must be available in the model", existingPackage); + + return existingPackage; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#createModelElement(org.eclipse.emf.edit.domain.EditingDomain, java.lang.Object) + */ + @Override + protected ModelElement createModelElement(final EditingDomain domain, final Object source) { + return new CommentModelElement((Element) source, domain); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return "ownedComment"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return Collections.EMPTY_LIST; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + if (null != existingComment) { + Collections.singletonList(existingComment); + } + return Collections.EMPTY_LIST; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + if (null == existingComment) { + existingComment = model.getOwnedComments().get(0); + Assert.assertNotNull("A comment should exist in the model", existingComment); + } + return existingComment; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableListTest#testAddAll() + */ + @Override + protected boolean testAddAll() { + return false; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableListTest#testRemoveAll() + */ + @Override + protected boolean testRemoveAll() { + return false; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableListTest#testRetainAll() + */ + @Override + protected boolean testRetainAll() { + return false; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableListTest#testClear() + */ + @Override + protected boolean testClear() { + return false; + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/OwnerObservableValueTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/OwnerObservableValueTest.java new file mode 100644 index 00000000000..6c133f2d50c --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/OwnerObservableValueTest.java @@ -0,0 +1,111 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrus.uml.properties.databinding.OwnerObservableValue; +import org.eclipse.papyrus.uml.properties.modelelement.MemberEndModelElement; +import org.eclipse.uml2.uml.Association; +import org.eclipse.uml2.uml.Property; +import org.junit.Assert; + +/** + * This allows to test the owner observable value. + */ +@SuppressWarnings({ "nls" }) +@PluginResource("model/OwnerObservableValue.di") +public class OwnerObservableValueTest extends AbstractUMLObservableValueTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#initializeContextObject() + */ + @Override + protected Object initializeContextObject() { + final Association association = (Association) model.getOwnedMember("Association1"); + Assert.assertNotNull("The association 'Association1' must be available in the model", association); + + final Property property = association.getOwnedEnds().get(0); + Assert.assertNotNull("The first property of 'Association1' must be available in the model", property); + + return property; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#createModelElement(org.eclipse.emf.edit.domain.EditingDomain, java.lang.Object) + */ + @Override + protected ModelElement createModelElement(final EditingDomain domain, final Object source) { + return new MemberEndModelElement((EObject) source, domain); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return MemberEndModelElement.OWNER; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return OwnerObservableValue.ASSOCIATION; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableValueTest#expectedValueType() + */ + @Override + protected Object expectedValueType() { + return String.class; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + return OwnerObservableValue.CLASSIFIER; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + return OwnerObservableValue.CLASSIFIER; + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ProfileApplicationObservableListTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ProfileApplicationObservableListTest.java new file mode 100644 index 00000000000..054d0714093 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ProfileApplicationObservableListTest.java @@ -0,0 +1,121 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import java.util.Collections; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrus.uml.extensionpoints.Registry; +import org.eclipse.papyrus.uml.extensionpoints.profile.IRegisteredProfile; +import org.eclipse.papyrus.uml.properties.modelelement.StereotypeApplicationModelElement; +import org.eclipse.uml2.uml.Element; +import org.eclipse.uml2.uml.Profile; +import org.junit.Assert; + +/** + * This allows to test the stereotype application observable list. + */ +@SuppressWarnings({ "nls" }) +@PluginResource("model/StereotypeApplicationObservableList.di") +public class ProfileApplicationObservableListTest extends AbstractUMLObservableListTest { + + /** + * The profile to apply to the model. + */ + protected Profile profileToApply = null; + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#initializeContextObject() + */ + @Override + protected Object initializeContextObject() { + return model; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#createModelElement(org.eclipse.emf.edit.domain.EditingDomain, java.lang.Object) + */ + @Override + protected ModelElement createModelElement(final EditingDomain domain, final Object source) { + return new StereotypeApplicationModelElement((Element) source, domain); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return "profileApplication"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return Collections.EMPTY_LIST; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + if (null != profileToApply) { + return Collections.singletonList(profileToApply); + } + return Collections.EMPTY_LIST; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + if (null == profileToApply) { + final IRegisteredProfile registeredProfile = Registry.getRegisteredProfiles().stream().filter(p -> "pathmap://UML_PROFILES/Ecore.profile.uml".equals(p.getUri().toString())).findFirst().get(); + + if (null != registeredProfile) { + final URI profileUri = registeredProfile.getUri(); + final Resource profileResource = editorFixture.getResourceSet().getResource(profileUri, true); + + if ((!profileResource.getContents().isEmpty()) && profileResource.getContents().get(0) instanceof Profile) { + profileToApply = (Profile) (profileResource.getContents().get(0)); + } + } + + Assert.assertNotNull("A profile must be available for the application", profileToApply); + } + return profileToApply; + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ProvidedInterfaceObservableListTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ProvidedInterfaceObservableListTest.java new file mode 100644 index 00000000000..31b683860fc --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/ProvidedInterfaceObservableListTest.java @@ -0,0 +1,115 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import java.util.Collections; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrus.uml.properties.modelelement.UMLModelElement; +import org.eclipse.uml2.uml.Component; +import org.eclipse.uml2.uml.Interface; +import org.eclipse.uml2.uml.Port; +import org.junit.Assert; + +/** + * This allows to test the provided interface observable list. + */ +@SuppressWarnings({ "nls" }) +@PluginResource("model/ProvidedAndRequiredInterfaceObservableList.di") +public class ProvidedInterfaceObservableListTest extends AbstractUMLObservableListTest { + + /** + * The existing interface to add to the existing port. + */ + protected Interface existingInterface = null; + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#initializeContextObject() + */ + @Override + protected Object initializeContextObject() { + final Component component = (Component) model.getOwnedMember("Component1"); + Assert.assertNotNull("The component 'Component1' must be available in the model", component); + + final Port port = !component.getOwnedPorts().isEmpty() ? component.getOwnedPorts().get(0) : null; + Assert.assertNotNull("The port 'Port1' must be available in the model", port); + + return port; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#createModelElement(org.eclipse.emf.edit.domain.EditingDomain, java.lang.Object) + */ + @Override + protected ModelElement createModelElement(final EditingDomain domain, final Object source) { + return new UMLModelElement((EObject) source, domain); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return "provided"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return Collections.EMPTY_LIST; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + if (null != existingInterface) { + return Collections.singletonList(existingInterface); + } + return Collections.EMPTY_LIST; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + if (null == existingInterface) { + existingInterface = (Interface) model.getOwnedMember("Interface1"); + Assert.assertNotNull("The interface 'Interface1' must be available in the model", existingInterface); + } + return existingInterface; + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/RequiredInterfaceObservableListTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/RequiredInterfaceObservableListTest.java new file mode 100644 index 00000000000..701a395768c --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/RequiredInterfaceObservableListTest.java @@ -0,0 +1,115 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import java.util.Collections; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrus.uml.properties.modelelement.UMLModelElement; +import org.eclipse.uml2.uml.Component; +import org.eclipse.uml2.uml.Interface; +import org.eclipse.uml2.uml.Port; +import org.junit.Assert; + +/** + * This allows to test the required interface observable list. + */ +@SuppressWarnings({ "nls" }) +@PluginResource("model/ProvidedAndRequiredInterfaceObservableList.di") +public class RequiredInterfaceObservableListTest extends AbstractUMLObservableListTest { + + /** + * The existing interface to add to the existing port. + */ + protected Interface existingInterface = null; + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#initializeContextObject() + */ + @Override + protected Object initializeContextObject() { + final Component component = (Component) model.getOwnedMember("Component1"); + Assert.assertNotNull("The component 'Component1' must be available in the model", component); + + final Port port = !component.getOwnedPorts().isEmpty() ? component.getOwnedPorts().get(0) : null; + Assert.assertNotNull("The port 'Port1' must be available in the model", port); + + return port; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#createModelElement(org.eclipse.emf.edit.domain.EditingDomain, java.lang.Object) + */ + @Override + protected ModelElement createModelElement(final EditingDomain domain, final Object source) { + return new UMLModelElement((EObject) source, domain); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return "required"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return Collections.EMPTY_LIST; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + if (null != existingInterface) { + return Collections.singletonList(existingInterface); + } + return Collections.EMPTY_LIST; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + if (null == existingInterface) { + existingInterface = (Interface) model.getOwnedMember("Interface1"); + Assert.assertNotNull("The interface 'Interface1' must be available in the model", existingInterface); + } + return existingInterface; + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/StereotypeApplicationObservableListTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/StereotypeApplicationObservableListTest.java new file mode 100644 index 00000000000..2738cdddb00 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/StereotypeApplicationObservableListTest.java @@ -0,0 +1,115 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import java.util.Collections; + +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrus.uml.properties.modelelement.StereotypeApplicationModelElement; +import org.eclipse.uml2.uml.Class; +import org.eclipse.uml2.uml.Element; +import org.eclipse.uml2.uml.Profile; +import org.eclipse.uml2.uml.Stereotype; +import org.junit.Assert; + +/** + * This allows to test the stereotype application observable list. + */ +@SuppressWarnings({ "nls" }) +@PluginResource("model/StereotypeApplicationObservableList.di") +public class StereotypeApplicationObservableListTest extends AbstractUMLObservableListTest { + + /** + * The existing stereotype from the profile. + */ + protected Stereotype existingStereotype = null; + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#initializeContextObject() + */ + @Override + protected Object initializeContextObject() { + final Class existingClass = (Class) model.getOwnedMember("Class1"); + Assert.assertNotNull("The class 'Class1' must be available in the model", existingClass); + + return existingClass; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#createModelElement(org.eclipse.emf.edit.domain.EditingDomain, java.lang.Object) + */ + @Override + protected ModelElement createModelElement(final EditingDomain domain, final Object source) { + return new StereotypeApplicationModelElement((Element) source, domain); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return StereotypeApplicationModelElement.STEREOTYPE_APPLICATION; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return Collections.EMPTY_LIST; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + if (null != existingStereotype) { + return Collections.singletonList(existingStereotype); + } + return Collections.EMPTY_LIST; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + if (null == existingStereotype) { + final Profile profile = !model.getAppliedProfiles().isEmpty() ? model.getAppliedProfiles().get(0) : null; + Assert.assertNotNull("A profile must be applied to the model", profile); + + existingStereotype = profile.getOwnedStereotype("EClass"); + Assert.assertNotNull("The stereotype 'EClass' must be available in the profile", existingStereotype); + } + return existingStereotype; + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/UMLLabelObservableValueTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/UMLLabelObservableValueTest.java new file mode 100644 index 00000000000..e537b483c72 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/UMLLabelObservableValueTest.java @@ -0,0 +1,108 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.papyrus.infra.internationalization.utils.utils.InternationalizationConstants; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrus.uml.properties.modelelement.UMLModelElement; +import org.eclipse.uml2.uml.Class; +import org.eclipse.uml2.uml.UMLPackage; +import org.junit.Assert; + +/** + * This allows to test the UML label observable value. + */ +@SuppressWarnings({ "nls" }) +@PluginResource("model/UMLLabelObservableValue.di") +public class UMLLabelObservableValueTest extends AbstractUMLObservableValueTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#initializeContextObject() + */ + @Override + protected Object initializeContextObject() { + final Class existingClass = (Class) model.getOwnedMember("Class1"); + Assert.assertNotNull("The class 'Class1' must be available in the model", existingClass); + + return existingClass; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#createModelElement(org.eclipse.emf.edit.domain.EditingDomain, java.lang.Object) + */ + @Override + protected ModelElement createModelElement(final EditingDomain domain, final Object source) { + return new UMLModelElement((EObject) source, domain); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return InternationalizationConstants.LABEL_PROPERTY_PATH; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return null; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableValueTest#expectedValueType() + */ + @Override + protected Object expectedValueType() { + return UMLPackage.eINSTANCE.getNamedElement__GetLabel(); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + return "MyClassLabel"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + return "MyClassLabel"; + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/UnsettableStringObservableValueTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/UnsettableStringObservableValueTest.java new file mode 100644 index 00000000000..23136e1d104 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/databinding/tests/UnsettableStringObservableValueTest.java @@ -0,0 +1,107 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.databinding.tests; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrus.uml.properties.modelelement.UMLModelElement; +import org.eclipse.uml2.uml.Class; +import org.eclipse.uml2.uml.UMLPackage; +import org.junit.Assert; + +/** + * This allows to test the unsettable string (example: name) observable value. + */ +@SuppressWarnings({ "nls" }) +@PluginResource("model/UnsettableStringObservableValue.di") +public class UnsettableStringObservableValueTest extends AbstractUMLObservableValueTest { + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#initializeContextObject() + */ + @Override + protected Object initializeContextObject() { + final Class existingClass = (Class) model.getOwnedMember("Class1"); + Assert.assertNotNull("The class 'Class1' must be available in the model", existingClass); + + return existingClass; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#createModelElement(org.eclipse.emf.edit.domain.EditingDomain, java.lang.Object) + */ + @Override + protected ModelElement createModelElement(final EditingDomain domain, final Object source) { + return new UMLModelElement((EObject) source, domain); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#getPropertyPath() + */ + @Override + protected String getPropertyPath() { + return "name"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedBeforeValue() + */ + @Override + protected Object expectedBeforeValue() { + return "Class1"; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableValueTest#expectedValueType() + */ + @Override + protected Object expectedValueType() { + return UMLPackage.Literals.NAMED_ELEMENT__NAME; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedAfterValue() + */ + @Override + protected Object expectedAfterValue() { + return null; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.properties.databinding.tests.AbstractObservableTest#expectedValueToSet() + */ + @Override + protected Object expectedValueToSet() { + return ""; + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/tests/AllTests.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/tests/AllTests.java index d53cfc75837..8845e3d40c8 100644 --- a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/tests/AllTests.java +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/tests/AllTests.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2018 CEA LIST and others. + * Copyright (c) 2018-2019 CEA LIST and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -10,11 +10,37 @@ * * Contributors: * Christian W. Damus - Initial API and implementation + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Bug *****************************************************************************/ package org.eclipse.papyrus.uml.properties.tests; import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite; +import org.eclipse.papyrus.uml.properties.databinding.tests.AnnotationObservableValueTest; +import org.eclipse.papyrus.uml.properties.databinding.tests.AppliedCommentsObservableListTest; +import org.eclipse.papyrus.uml.properties.databinding.tests.BasicObservableListTest; +import org.eclipse.papyrus.uml.properties.databinding.tests.BasicObservableValueTest; +import org.eclipse.papyrus.uml.properties.databinding.tests.ElementCustomizationElementIconObservableValueTest; +import org.eclipse.papyrus.uml.properties.databinding.tests.ElementCustomizationQualifiedNameObservableValueTest; +import org.eclipse.papyrus.uml.properties.databinding.tests.ElementCustomizationShadowObservableValueTest; +import org.eclipse.papyrus.uml.properties.databinding.tests.ExtensionEndMultiplicityObservableValueTest; +import org.eclipse.papyrus.uml.properties.databinding.tests.ExtensionRequiredObservableValueTest; +import org.eclipse.papyrus.uml.properties.databinding.tests.ImageExpressionObservableValueTest; +import org.eclipse.papyrus.uml.properties.databinding.tests.ImageKindObservableValueTest; +import org.eclipse.papyrus.uml.properties.databinding.tests.ImageNameObservableValueTest; +import org.eclipse.papyrus.uml.properties.databinding.tests.ImportedPackageLocationObservableValueTest; +import org.eclipse.papyrus.uml.properties.databinding.tests.KeywordObservableValueTest; +import org.eclipse.papyrus.uml.properties.databinding.tests.MaskValueObservableListTest; +import org.eclipse.papyrus.uml.properties.databinding.tests.MultiplicityObservableValueTest; +import org.eclipse.papyrus.uml.properties.databinding.tests.NavigationObservableValueTest; +import org.eclipse.papyrus.uml.properties.databinding.tests.OwnedCommentsObservableListTest; +import org.eclipse.papyrus.uml.properties.databinding.tests.OwnerObservableValueTest; +import org.eclipse.papyrus.uml.properties.databinding.tests.ProfileApplicationObservableListTest; +import org.eclipse.papyrus.uml.properties.databinding.tests.ProvidedInterfaceObservableListTest; +import org.eclipse.papyrus.uml.properties.databinding.tests.RequiredInterfaceObservableListTest; +import org.eclipse.papyrus.uml.properties.databinding.tests.StereotypeApplicationObservableListTest; +import org.eclipse.papyrus.uml.properties.databinding.tests.UMLLabelObservableValueTest; +import org.eclipse.papyrus.uml.properties.databinding.tests.UnsettableStringObservableValueTest; import org.eclipse.papyrus.uml.properties.modelelement.tests.UMLModelElementTest; import org.junit.runner.RunWith; import org.junit.runners.Suite.SuiteClasses; @@ -25,6 +51,36 @@ import org.junit.runners.Suite.SuiteClasses; @RunWith(ClassificationSuite.class) @SuiteClasses({ UMLModelElementTest.class, + + // Tests for observable values + MultiplicityObservableValueTest.class, + ExtensionEndMultiplicityObservableValueTest.class, + NavigationObservableValueTest.class, + OwnerObservableValueTest.class, + KeywordObservableValueTest.class, + UMLLabelObservableValueTest.class, + ImageExpressionObservableValueTest.class, + ImageKindObservableValueTest.class, + ImageNameObservableValueTest.class, + ElementCustomizationElementIconObservableValueTest.class, + ElementCustomizationQualifiedNameObservableValueTest.class, + ElementCustomizationShadowObservableValueTest.class, + ExtensionRequiredObservableValueTest.class, + ImportedPackageLocationObservableValueTest.class, + UnsettableStringObservableValueTest.class, + BasicObservableValueTest.class, + AnnotationObservableValueTest.class, + + // Tests for observable lists + MaskValueObservableListTest.class, + AppliedCommentsObservableListTest.class, + OwnedCommentsObservableListTest.class, + ProvidedInterfaceObservableListTest.class, + RequiredInterfaceObservableListTest.class, + ProfileApplicationObservableListTest.class, + StereotypeApplicationObservableListTest.class, + BasicObservableListTest.class, + }) public class AllTests { // Everything is specified in class annotations diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/tests/DiagramViewUtils.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/tests/DiagramViewUtils.java new file mode 100644 index 00000000000..d05cebb063f --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/tests/DiagramViewUtils.java @@ -0,0 +1,66 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.properties.tests; + +import java.util.Iterator; + +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.junit.utils.DiagramUtils; + +/** + * This allows to define utilities methods concerning diagram views. + */ +public class DiagramViewUtils { + + /** + * Constructor to avoid external initialization. + */ + private DiagramViewUtils() { + // Do nothing + } + + /** + * Get view of the semantic element. + * + * @param diagram + * The diagram where find the view. + * @param semanticElement + * The name of the semantic element. + * @return A corresponding view of the semantic element. + */ + public static View getDiagramView(final Diagram diagram, final String semanticElement) { + View diagramView = DiagramUtils.findShape(diagram, semanticElement); + if (null == diagramView) { + diagramView = DiagramUtils.findEdge(diagram, semanticElement); + } + if (null == diagramView) { + Iterator<?> iterator = diagram.eAllContents(); + while (null == diagramView && iterator.hasNext()) { + final Object object = iterator.next(); + if (object instanceof View) { + diagramView = DiagramUtils.findShape((View) object, semanticElement); + if (null == diagramView) { + diagramView = DiagramUtils.findEdge((View) object, semanticElement); + } + } + } + } + + return diagramView; + } + +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.suite.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.suite.tests/META-INF/MANIFEST.MF index 84ed38084d7..ceef5622cde 100755 --- a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.suite.tests/META-INF/MANIFEST.MF +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.suite.tests/META-INF/MANIFEST.MF @@ -38,5 +38,6 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.uml.alf.tests;bundle-version="[1.2.0,2.0.0)", org.eclipse.papyrus.uml.expressions.tests;bundle-version="[1.0.0,2.0.0)", org.eclipse.papyrus.uml.architecture.tests;bundle-version="1.1.200", - org.eclipse.papyrus.uml.properties.tests;bundle-version="[1.0.0,2.0.0)" + org.eclipse.papyrus.uml.properties.tests;bundle-version="[1.0.0,2.0.0)", + org.eclipse.papyrus.uml.diagram.properties.tests;bundle-version="[1.0.0,2.0.0)" Automatic-Module-Name: org.eclipse.papyrus.uml.suite.tests diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.suite.tests/test/org/eclipse/papyrus/uml/suite/tests/AllTests.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.suite.tests/test/org/eclipse/papyrus/uml/suite/tests/AllTests.java index e0b2e553c48..0f34731851e 100755 --- a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.suite.tests/test/org/eclipse/papyrus/uml/suite/tests/AllTests.java +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.suite.tests/test/org/eclipse/papyrus/uml/suite/tests/AllTests.java @@ -52,6 +52,7 @@ public class AllTests { suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.wizards.AllTests.class)); suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.modelrepair.tests.AllTests.class)); suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.properties.tests.AllTests.class)); + suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.properties.tests.AllTests.class)); suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.profile.tests.AllTests.class)); suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.decoratormodel.tests.AllTests.class)); suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.decoratormodel.controlmode.tests.AllTests.class)); |