-
Notifications
You must be signed in to change notification settings - Fork 3
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
RAS-939 Survey Status Change #289
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
a4f3317
Adding new casegroup transition
arroyoAle 218798e
Merge branch 'main' into complete-to-not-started
arroyoAle 16af572
auto patch increment
ras-rm-pr-bot 6c6bf0d
adding test for transition
arroyoAle 186a83f
cleaning up name
arroyoAle ed86c52
swapping asserts for consistency
arroyoAle d0a434f
making the test change to the right state
arroyoAle 72d64c2
auto patch increment
ras-rm-pr-bot e18b4bb
Merge branch 'main' into complete-to-not-started
arroyoAle 60fb707
updating comment
arroyoAle 26bad6c
Merge remote-tracking branch 'origin/complete-to-not-started' into co…
arroyoAle b06cc41
formatting
arroyoAle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ public void givenCaseStateSampledInitWhenActivatedThenActionable() throws CTPExc | |
caseStateMachine.transition(sampledInit, CaseDTO.CaseEvent.ACTIVATED); | ||
|
||
// Then | ||
assertEquals(destinationState, CaseState.ACTIONABLE); | ||
assertEquals(CaseState.ACTIONABLE, destinationState); | ||
} | ||
|
||
@Test | ||
|
@@ -49,7 +49,7 @@ public void givenCaseStateReplacementInitWhenReplacedThenActionable() throws CTP | |
caseStateMachine.transition(replacementInit, CaseDTO.CaseEvent.REPLACED); | ||
|
||
// Then | ||
assertEquals(destinationState, CaseState.ACTIONABLE); | ||
assertEquals(CaseState.ACTIONABLE, destinationState); | ||
} | ||
|
||
@Test | ||
|
@@ -62,7 +62,7 @@ public void givenCaseStateActionableWhenDisabledThenInactionable() throws CTPExc | |
caseStateMachine.transition(actionable, CaseDTO.CaseEvent.DISABLED); | ||
|
||
// Then | ||
assertEquals(destinationState, CaseState.INACTIONABLE); | ||
assertEquals(CaseState.INACTIONABLE, destinationState); | ||
} | ||
|
||
@Test | ||
|
@@ -75,7 +75,7 @@ public void givenCaseStateActionableWhenDeactivatedThenInactionable() throws CTP | |
caseStateMachine.transition(actionable, CaseDTO.CaseEvent.DEACTIVATED); | ||
|
||
// Then | ||
assertEquals(destinationState, CaseState.INACTIONABLE); | ||
assertEquals(CaseState.INACTIONABLE, destinationState); | ||
} | ||
|
||
@Test | ||
|
@@ -88,7 +88,7 @@ public void givenCaseStateInactionableWhenDisabledThenInactionable() throws CTPE | |
caseStateMachine.transition(inactionable, CaseDTO.CaseEvent.DISABLED); | ||
|
||
// Then | ||
assertEquals(destinationState, CaseState.INACTIONABLE); | ||
assertEquals(CaseState.INACTIONABLE, destinationState); | ||
} | ||
|
||
@Test | ||
|
@@ -101,7 +101,7 @@ public void givenCaseStateInactionableWhenDeactivatedThenInactionable() throws C | |
caseStateMachine.transition(inactionable, CaseDTO.CaseEvent.DEACTIVATED); | ||
|
||
// Then | ||
assertEquals(destinationState, CaseState.INACTIONABLE); | ||
assertEquals(CaseState.INACTIONABLE, destinationState); | ||
} | ||
|
||
@Test | ||
|
@@ -115,7 +115,7 @@ public void givenCaseGroupStateNotStartedWhenCIDownloadedThenInProgress() throws | |
notStarted, CategoryDTO.CategoryName.COLLECTION_INSTRUMENT_DOWNLOADED); | ||
|
||
// Then | ||
assertEquals(destinationState, CaseGroupStatus.INPROGRESS); | ||
assertEquals(CaseGroupStatus.INPROGRESS, destinationState); | ||
} | ||
|
||
@Test | ||
|
@@ -128,7 +128,7 @@ public void givenCaseGroupStateNotStartedWhenEQLaunchThenInProgress() throws CTP | |
caseGroupStateMachine.transition(notStarted, CategoryDTO.CategoryName.EQ_LAUNCH); | ||
|
||
// Then | ||
assertEquals(destinationState, CaseGroupStatus.INPROGRESS); | ||
assertEquals(CaseGroupStatus.INPROGRESS, destinationState); | ||
} | ||
|
||
@Test | ||
|
@@ -143,7 +143,7 @@ public void givenCaseGroupStateNotStartedWhenSuccessfulResponseUploadedThenCompl | |
notStarted, CategoryDTO.CategoryName.SUCCESSFUL_RESPONSE_UPLOAD); | ||
|
||
// Then | ||
assertEquals(destinationState, CaseGroupStatus.COMPLETE); | ||
assertEquals(CaseGroupStatus.COMPLETE, destinationState); | ||
} | ||
|
||
@Test | ||
|
@@ -157,7 +157,7 @@ public void givenCaseGroupStateNotStartedWhenCompletedByPhoneThenCompletedByPhon | |
caseGroupStateMachine.transition(notStarted, CategoryDTO.CategoryName.COMPLETED_BY_PHONE); | ||
|
||
// Then | ||
assertEquals(destinationState, CaseGroupStatus.COMPLETEDBYPHONE); | ||
assertEquals(CaseGroupStatus.COMPLETEDBYPHONE, destinationState); | ||
} | ||
|
||
@Test | ||
|
@@ -171,7 +171,7 @@ public void givenCaseGroupStateNotStartedWhenNoLongerRequiredThenNoLongerRequire | |
caseGroupStateMachine.transition(notStarted, CategoryDTO.CategoryName.NO_LONGER_REQUIRED); | ||
|
||
// Then | ||
assertEquals(destinationState, CaseGroupStatus.NOLONGERREQUIRED); | ||
assertEquals(CaseGroupStatus.NOLONGERREQUIRED, destinationState); | ||
} | ||
|
||
@Test | ||
|
@@ -186,7 +186,7 @@ public void givenCaseGroupStateInProgressWhenSuccessfulResponseUploadThenComplet | |
inProgress, CategoryDTO.CategoryName.SUCCESSFUL_RESPONSE_UPLOAD); | ||
|
||
// Then | ||
assertEquals(destinationState, CaseGroupStatus.COMPLETE); | ||
assertEquals(CaseGroupStatus.COMPLETE, destinationState); | ||
} | ||
|
||
@Test | ||
|
@@ -200,7 +200,7 @@ public void givenCaseGroupStateInProgressWhenCompletedByPhoneThenCompletedByPhon | |
caseGroupStateMachine.transition(inProgress, CategoryDTO.CategoryName.COMPLETED_BY_PHONE); | ||
|
||
// Then | ||
assertEquals(destinationState, CaseGroupStatus.COMPLETEDBYPHONE); | ||
assertEquals(CaseGroupStatus.COMPLETEDBYPHONE, destinationState); | ||
} | ||
|
||
@Test | ||
|
@@ -214,7 +214,7 @@ public void givenCaseGroupStateInProgressWhenNoLongerRequiredThenNoLongerRequire | |
caseGroupStateMachine.transition(inProgress, CategoryDTO.CategoryName.NO_LONGER_REQUIRED); | ||
|
||
// Then | ||
assertEquals(destinationState, CaseGroupStatus.NOLONGERREQUIRED); | ||
assertEquals(CaseGroupStatus.NOLONGERREQUIRED, destinationState); | ||
} | ||
|
||
@Test | ||
|
@@ -228,7 +228,7 @@ public void givenCaseGroupStateReopenedWhenCompletedByPhoneThenCompletedByPhone( | |
caseGroupStateMachine.transition(reopened, CategoryDTO.CategoryName.COMPLETED_BY_PHONE); | ||
|
||
// Then | ||
assertEquals(destinationState, CaseGroupStatus.COMPLETEDBYPHONE); | ||
assertEquals(CaseGroupStatus.COMPLETEDBYPHONE, destinationState); | ||
} | ||
|
||
@Test | ||
|
@@ -242,7 +242,7 @@ public void givenCaseGroupStateReopenedWhenNoLongerRequiredThenNoLongerRequired( | |
caseGroupStateMachine.transition(reopened, CategoryDTO.CategoryName.NO_LONGER_REQUIRED); | ||
|
||
// Then | ||
assertEquals(destinationState, CaseGroupStatus.NOLONGERREQUIRED); | ||
assertEquals(CaseGroupStatus.NOLONGERREQUIRED, destinationState); | ||
} | ||
|
||
// Social Outcomes | ||
|
@@ -580,4 +580,18 @@ public void givenUnknownEligibilityWhenEqLaunchThenComplete() throws CTPExceptio | |
// Then | ||
assertEquals(CaseGroupStatus.COMPLETE, destinationState); | ||
} | ||
|
||
@Test | ||
public void testCaseGroupTransitionFromCompleteToNotStarted() throws CTPException { | ||
// Given | ||
CaseGroupStatus notStarted = CaseGroupStatus.NOTSTARTED; | ||
|
||
// When | ||
CaseGroupStatus destinationState = | ||
caseGroupStateMachine.transition( | ||
notStarted, CategoryDTO.CategoryName.OFFLINE_RESPONSE_PROCESSED); | ||
|
||
// Then | ||
assertEquals(CaseGroupStatus.COMPLETE, destinationState); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this right? I was expecting not started There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're right I've fixed this |
||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's very minor but I'd update the comment to include this transition change as well just to prevent any potential future confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment has been updated