CourseStaffDTO.java

1
package edu.ucsb.cs156.frontiers.models;
2
3
import edu.ucsb.cs156.frontiers.entities.CourseStaff;
4
import edu.ucsb.cs156.frontiers.enums.OrgStatus;
5
6
/**
7
 * This is a DTO class that represents a staff member in a course. It is used to transfer data
8
 * between the server and the client.
9
 */
10
public record CourseStaffDTO(
11
    Long id,
12
    Long courseId,
13
    String firstName,
14
    String lastName,
15
    String email,
16
    String role,
17
    long userId,
18
    Integer githubId,
19
    String githubLogin,
20
    OrgStatus orgStatus) {
21
22
  public CourseStaffDTO(CourseStaff courseStaff) {
23
    this(
24
        courseStaff.getId(),
25
        courseStaff.getCourse().getId(),
26
        courseStaff.getFirstName(),
27
        courseStaff.getLastName(),
28
        courseStaff.getEmail(),
29
        courseStaff.getRole(),
30 1 1. <init> : negated conditional → KILLED
        courseStaff.getUser() != null ? courseStaff.getUser().getId() : 0,
31
        courseStaff.getGithubId(),
32
        courseStaff.getGithubLogin(),
33
        courseStaff.getOrgStatus());
34
  }
35
}

Mutations

30

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

Active mutators

Tests examined


Report generated by PIT 1.17.0