forked from sw360/sw360portal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request sw360#208 from sw360/autosettingClearingState#127
Autosetting clearing state#127
- Loading branch information
Showing
8 changed files
with
67 additions
and
35 deletions.
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
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright Siemens AG, 2013-2015. Part of the SW360 Portal Project. | ||
* Copyright Siemens AG, 2013-2016. Part of the SW360 Portal Project. | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
|
@@ -19,6 +19,7 @@ | |
|
||
/** | ||
* @author [email protected] | ||
* @author [email protected] | ||
*/ | ||
public class ReleaseClearingStateSummaryComputerTest extends ScenarioTest<GivenReleasesWithFossologyStatus, WhenComputeClearingState, ThenReleaseClearingState> { | ||
|
||
|
@@ -81,17 +82,18 @@ public void test2() throws Exception { | |
@Test | ||
public void test3() throws Exception { | ||
given() | ||
.a_release_with_clearing_status(ClearingState.SENT_TO_FOSSOLOGY) | ||
.a_release_with_clearing_status(ClearingState.NEW_CLEARING) | ||
.and() | ||
.a_release_with_fossology_status_$_for_$_and_$_for_$( | ||
.a_release_with_clearing_status_$_and_fossology_status_$_for_$_and_$_for_$( | ||
ClearingState.SENT_TO_FOSSOLOGY, | ||
FossologyStatus.SCANNING, CLEARING_TEAM, | ||
FossologyStatus.CLOSED, ANOTHER_CLEARING_TEAM); | ||
|
||
when().the_clearing_state_is_computed_for(CLEARING_TEAM); | ||
|
||
then() | ||
.new_releases_should_be(0).and() | ||
.under_clearing_should_be(1).and() | ||
.new_releases_should_be(1).and() | ||
.under_clearing_should_be(0).and() | ||
.under_clearing_by_project_team_should_be(1).and() | ||
.report_available_should_be(0); | ||
|
||
|
@@ -170,7 +172,7 @@ public void test6() throws Exception { | |
@Test | ||
public void test7() throws Exception { | ||
given() | ||
.a_release_with_clearing_status(ClearingState.SENT_TO_FOSSOLOGY); | ||
.a_release_with_clearing_status_$_and_fossology_status_$_for_$(ClearingState.SENT_TO_FOSSOLOGY, FossologyStatus.OPEN, ANOTHER_CLEARING_TEAM); | ||
|
||
when().the_clearing_state_is_computed_for(CLEARING_TEAM); | ||
|
||
|
@@ -229,26 +231,26 @@ public void test90() throws Exception { | |
} | ||
|
||
@Test | ||
public void the_clearing_moves_to_the_right_following_clearing_team_but_is_reset_by_the_global_release_clearing_state() { | ||
public void the_clearing_moves_to_the_right_following_clearing_team_but_is_overwritten_by_global_clearing_state_above_under_clearing() { | ||
given().a_new_release(); | ||
|
||
when().the_clearing_state_is_computed_for(CLEARING_TEAM); | ||
|
||
then().new_releases_should_be(1); | ||
|
||
when().the_release_is_sent_for_clearing_to(CLEARING_TEAM); | ||
then().new_releases_should_be(0).and().under_clearing_by_project_team_should_be(1); | ||
then().new_releases_should_be(0).and().under_clearing_by_project_team_should_be(1).and().report_available_should_be(0).and().approved_should_be(0); | ||
|
||
when().the_release_is_sent_for_clearing_to(ANOTHER_CLEARING_TEAM); | ||
then().under_clearing_should_be(0).and().under_clearing_by_project_team_should_be(1); | ||
|
||
when().team_$_sets_fossology_status_to(CLEARING_TEAM, FossologyStatus.CLOSED); | ||
then().under_clearing_should_be(0).and().under_clearing_by_project_team_should_be(0).and().report_available_should_be(1); | ||
then().under_clearing_should_be(0).and().under_clearing_by_project_team_should_be(1).and().report_available_should_be(0).and().approved_should_be(0); | ||
|
||
when().the_release_clearing_state_is_set_to(ClearingState.UNDER_CLEARING); | ||
then().under_clearing_should_be(1).and().under_clearing_by_project_team_should_be(0).and().report_available_should_be(0); | ||
// when().team_$_sets_fossology_status_to(CLEARING_TEAM, FossologyStatus.CLOSED); | ||
// then().under_clearing_should_be(0).and().under_clearing_by_project_team_should_be(0).and().report_available_should_be(1); | ||
// | ||
when().the_release_clearing_state_is_set_to(ClearingState.REPORT_AVAILABLE); | ||
then().under_clearing_should_be(0).and().under_clearing_by_project_team_should_be(0).and().report_available_should_be(1).and().approved_should_be(0); | ||
|
||
when().the_release_clearing_state_is_set_to(ClearingState.NEW_CLEARING); | ||
then().under_clearing_should_be(0).and().under_clearing_by_project_team_should_be(0).and().report_available_should_be(1); | ||
when().the_release_clearing_state_is_set_to(ClearingState.APPROVED); | ||
then().under_clearing_should_be(0).and().under_clearing_by_project_team_should_be(0).and().report_available_should_be(0).and().approved_should_be(1); | ||
} | ||
} |
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