-
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.
#151 First draft implementation for team score claulation in backend
Signed-off-by: Sven Strittmatter <[email protected]>
- Loading branch information
1 parent
08ac7ab
commit 059f8b2
Showing
6 changed files
with
91 additions
and
132 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
33 changes: 0 additions & 33 deletions
33
src/main/java/com/iteratec/teamdojo/service/impl/custom/CompletionCheck.java
This file was deleted.
Oops, something went wrong.
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
23 changes: 0 additions & 23 deletions
23
src/main/java/com/iteratec/teamdojo/service/impl/custom/Progress.java
This file was deleted.
Oops, something went wrong.
51 changes: 51 additions & 0 deletions
51
src/test/java/com/iteratec/teamdojo/service/impl/custom/CustomTeamScoreServiceImplTest.java
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package com.iteratec.teamdojo.service.impl.custom; | ||
|
||
import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat; | ||
import static org.junit.jupiter.api.Assertions.assertAll; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
/** | ||
* | ||
*/ | ||
class CustomTeamScoreServiceImplTest { | ||
|
||
private final CustomTeamScoreServiceImpl sut = new CustomTeamScoreServiceImpl(); | ||
|
||
@Test | ||
void calculateProgress() {} | ||
|
||
@Test | ||
void calculateTotalScore() {} | ||
|
||
@Test | ||
void calculateRequired() {} | ||
|
||
@Test | ||
void calculateAchieved() {} | ||
|
||
@Test | ||
void calculateProgressInPercent() {} | ||
|
||
@Test | ||
void calculateCompleted() { | ||
assertAll( | ||
() -> assertThat(sut.calculateCompleted(-1, 0)).isFalse(), | ||
() -> assertThat(sut.calculateCompleted(0, -1)).isTrue(), | ||
() -> assertThat(sut.calculateCompleted(-1, -1)).isTrue(), | ||
() -> assertThat(sut.calculateCompleted(0, 0)).isTrue(), | ||
() -> assertThat(sut.calculateCompleted(1, 0)).isTrue(), | ||
() -> assertThat(sut.calculateCompleted(2, 0)).isTrue(), | ||
() -> assertThat(sut.calculateCompleted(3, 0)).isTrue(), | ||
() -> assertThat(sut.calculateCompleted(3, 1)).isTrue(), | ||
() -> assertThat(sut.calculateCompleted(3, 2)).isTrue(), | ||
() -> assertThat(sut.calculateCompleted(3, 3)).isTrue(), | ||
() -> assertThat(sut.calculateCompleted(3, 4)).isFalse(), | ||
() -> assertThat(sut.calculateCompleted(3, 5)).isFalse(), | ||
() -> assertThat(sut.calculateCompleted(Integer.MAX_VALUE, Integer.MAX_VALUE)).isTrue(), | ||
() -> assertThat(sut.calculateCompleted(Integer.MAX_VALUE, Integer.MIN_VALUE)).isTrue(), | ||
() -> assertThat(sut.calculateCompleted(Integer.MIN_VALUE, Integer.MAX_VALUE)).isFalse(), | ||
() -> assertThat(sut.calculateCompleted(Integer.MIN_VALUE, Integer.MIN_VALUE)).isTrue() | ||
); | ||
} | ||
} |