RosterStudentDTO.java

1
package edu.ucsb.cs156.frontiers.models;
2
3
import edu.ucsb.cs156.frontiers.entities.RosterStudent;
4
import edu.ucsb.cs156.frontiers.enums.OrgStatus;
5
import edu.ucsb.cs156.frontiers.enums.RosterStatus;
6
import java.util.List;
7
8
/**
9
 * This is a DTO class that represents a student in the roster. It is used to transfer data between
10
 * the server and the client.
11
 */
12
public record RosterStudentDTO(
13
    Long id,
14
    Long courseId,
15
    String studentId,
16
    String firstName,
17
    String lastName,
18
    String email,
19
    String section,
20
    long userId,
21
    Integer githubId,
22
    String githubLogin,
23
    RosterStatus rosterStatus,
24
    OrgStatus orgStatus,
25
    List<String> teams) {
26
27
  public RosterStudentDTO(RosterStudent rosterStudent) {
28
    this(
29
        rosterStudent.getId(),
30
        rosterStudent.getCourse().getId(),
31
        rosterStudent.getStudentId(),
32
        rosterStudent.getFirstName(),
33
        rosterStudent.getLastName(),
34
        rosterStudent.getEmail(),
35
        rosterStudent.getSection(),
36 1 1. <init> : negated conditional → KILLED
        rosterStudent.getUser() != null ? rosterStudent.getUser().getId() : 0,
37
        rosterStudent.getGithubId(),
38
        rosterStudent.getGithubLogin(),
39
        rosterStudent.getRosterStatus(),
40
        rosterStudent.getOrgStatus(),
41
        rosterStudent.getTeams());
42
  }
43
}

Mutations

36

1.1
Location : <init>
Killed by : edu.ucsb.cs156.frontiers.models.RosterStudentDTOTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.frontiers.models.RosterStudentDTOTests]/[method:test_from_when_user_is_null()]
negated conditional → KILLED

Active mutators

Tests examined


Report generated by PIT 1.17.0