-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bba6fdf
commit 254394f
Showing
12 changed files
with
91 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,7 @@ jacocoTestReport { | |
violationRules { | ||
rule { | ||
limit { | ||
minimum = 0.10 | ||
minimum = 0.05 | ||
} | ||
} | ||
} | ||
|
25 changes: 25 additions & 0 deletions
25
src/main/java/com/sitblueprint/admin/dtos/MemberSummaryDTO.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,25 @@ | ||
package com.sitblueprint.admin.dtos; | ||
|
||
import com.sitblueprint.admin.model.users.Role; | ||
import java.time.LocalDate; | ||
import java.util.Set; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
@Setter | ||
@Getter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class MemberSummaryDTO { | ||
private Long id; | ||
private String name; | ||
private String username; | ||
private String email; | ||
private boolean isActive; | ||
private LocalDate dateJoined; | ||
private Set<Role> roles; | ||
} |
2 changes: 1 addition & 1 deletion
2
...n/dtos/member/OrganizationSummaryDTO.java → ...nt/admin/dtos/OrganizationSummaryDTO.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
2 changes: 1 addition & 1 deletion
2
...int/admin/dtos/member/TeamSummaryDTO.java → ...tblueprint/admin/dtos/TeamSummaryDTO.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
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
35 changes: 35 additions & 0 deletions
35
src/main/java/com/sitblueprint/admin/dtos/team/TeamDTO.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,35 @@ | ||
package com.sitblueprint.admin.dtos.team; | ||
|
||
import com.sitblueprint.admin.dtos.MemberSummaryDTO; | ||
import com.sitblueprint.admin.dtos.OrganizationSummaryDTO; | ||
import com.sitblueprint.admin.model.users.Team; | ||
import java.time.LocalDate; | ||
import java.util.Set; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class TeamDTO { | ||
private Long id; | ||
private String name; | ||
private OrganizationSummaryDTO organizationSummaryDTO; | ||
private MemberSummaryDTO teamLead; | ||
private MemberSummaryDTO projectManager; | ||
private MemberSummaryDTO designer; | ||
private LocalDate dateCreated; | ||
private Set<MemberSummaryDTO> members; | ||
|
||
public Team toEntity() { | ||
return Team.builder() | ||
.id(this.id) | ||
.name(this.name) | ||
.build(); | ||
} | ||
} |
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
20 changes: 20 additions & 0 deletions
20
src/test/java/com/sitblueprint/admin/service/users/TeamServiceTest.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,20 @@ | ||
package com.sitblueprint.admin.service.users; | ||
|
||
import com.sitblueprint.admin.model.users.Team; | ||
import com.sitblueprint.admin.repository.users.AttendanceRepository; | ||
import com.sitblueprint.admin.repository.users.TeamRepository; | ||
import org.junit.jupiter.api.extension.ExtendWith; | ||
import org.mockito.Mock; | ||
import org.mockito.junit.jupiter.MockitoExtension; | ||
|
||
@ExtendWith(MockitoExtension.class) | ||
public class TeamServiceTest { | ||
@Mock | ||
TeamRepository teamRepository; | ||
|
||
@Mock | ||
AttendanceRepository attendanceRepository; | ||
|
||
private TeamService teamService; | ||
private Team testTeam; | ||
} |