Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue 923 #978

Merged
merged 6 commits into from
Jan 27, 2017
Merged

Fix issue 923 #978

merged 6 commits into from
Jan 27, 2017

Conversation

jblang94
Copy link
Contributor

Description

This PR fixes issue #923 by modifying the state_machine_Event.ump template for both Java and PHP generated code. This template now checks if an event implements an interface method. For Java, the "@OverRide" directive is placed on top of the event's method if it implements an interface method. On my Mac, the full build is successful.

Tests

Added the following tests to "PhpClassTemplateTest.java" and "JavaClassTemplateTest.java" to check the generated PHP and Java code for when a state machine implements all, some, or none of the methods in an interface.

StateMachineImplementsInterface
Umple File: ClassTemplateTest_StateMachineImplementsInterface.ump

StateMachineImplementsPartialInterface
Umple File: ClassTemplateTest_StateMachineImplementsPartialInterface.ump

StateMachineDoesNotImplementInterface
Umple File: ClassTemplateTest_StateMachineDoesNotImplementInterface.ump

For the PHP tests, none of the methods in the .ump files include parameters since issue #964 is still being fixed.

* Update state_machine_Event.ump to check if the event implements an interface method
* Add test case for when the state machine fully implements an interface
* Add test case for when the state machine partially implements an interface
* Add test case for when the state machine does not implement an interface
    * Update state_machine_Event.ump to check if the event implements an interface method
    * Add test case for when the state machine fully implements an interface
    * Add test case for when the state machine partially implements an interface
    * Add test case for when the state machine does not implement an interface
@vahdat-ab
Copy link
Member

Thanks.

@vahdat-ab vahdat-ab merged commit 5c71af9 into umple:master Jan 27, 2017
@jblang94 jblang94 deleted the resolve_issue_923 branch January 27, 2017 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants