CmsSection.java

1
package com.fwmotion.threescale.cms.model;
2
3
import jakarta.annotation.Nonnull;
4
import jakarta.annotation.Nullable;
5
import org.apache.commons.lang3.builder.EqualsBuilder;
6
import org.apache.commons.lang3.builder.HashCodeBuilder;
7
import org.apache.commons.lang3.builder.ToStringBuilder;
8
9
import java.time.OffsetDateTime;
10
11
public class CmsSection implements CmsObject {
12
13
    private OffsetDateTime createdAt;
14
    private OffsetDateTime updatedAt;
15
    private Long id;
16
    private String systemName;
17
    private Long parentId;
18
    private String title;
19
    private Boolean _public;
20
    private String path;
21
22
    @Nonnull
23
    @Override
24
    public ThreescaleObjectType getType() {
25 1 1. getType : replaced return value with null for com/fwmotion/threescale/cms/model/CmsSection::getType → KILLED
        return ThreescaleObjectType.SECTION;
26
    }
27
28
    @Override
29
    public OffsetDateTime getCreatedAt() {
30 1 1. getCreatedAt : replaced return value with null for com/fwmotion/threescale/cms/model/CmsSection::getCreatedAt → KILLED
        return createdAt;
31
    }
32
33
    public void setCreatedAt(OffsetDateTime createdAt) {
34
        this.createdAt = createdAt;
35
    }
36
37
    @Override
38
    public OffsetDateTime getUpdatedAt() {
39 1 1. getUpdatedAt : replaced return value with null for com/fwmotion/threescale/cms/model/CmsSection::getUpdatedAt → KILLED
        return updatedAt;
40
    }
41
42
    public void setUpdatedAt(OffsetDateTime updatedAt) {
43
        this.updatedAt = updatedAt;
44
    }
45
46
    @Nullable
47
    @Override
48
    public Long getId() {
49 1 1. getId : replaced Long return value with 0L for com/fwmotion/threescale/cms/model/CmsSection::getId → KILLED
        return id;
50
    }
51
52
    public void setId(Long id) {
53
        this.id = id;
54
    }
55
56
    public String getSystemName() {
57 1 1. getSystemName : replaced return value with "" for com/fwmotion/threescale/cms/model/CmsSection::getSystemName → KILLED
        return systemName;
58
    }
59
60
    public void setSystemName(String systemName) {
61
        this.systemName = systemName;
62
    }
63
64
    public Long getParentId() {
65 1 1. getParentId : replaced Long return value with 0L for com/fwmotion/threescale/cms/model/CmsSection::getParentId → KILLED
        return parentId;
66
    }
67
68
    public void setParentId(Long parentId) {
69
        this.parentId = parentId;
70
    }
71
72
    public String getTitle() {
73 1 1. getTitle : replaced return value with "" for com/fwmotion/threescale/cms/model/CmsSection::getTitle → KILLED
        return title;
74
    }
75
76
    public void setTitle(String title) {
77
        this.title = title;
78
    }
79
80
    public Boolean getPublic() {
81 2 1. getPublic : replaced Boolean return with True for com/fwmotion/threescale/cms/model/CmsSection::getPublic → SURVIVED
2. getPublic : replaced Boolean return with False for com/fwmotion/threescale/cms/model/CmsSection::getPublic → KILLED
        return _public;
82
    }
83
84
    public void setPublic(Boolean _public) {
85
        this._public = _public;
86
    }
87
88
    public String getPath() {
89 1 1. getPath : replaced return value with "" for com/fwmotion/threescale/cms/model/CmsSection::getPath → KILLED
        return path;
90
    }
91
92
    public void setPath(String path) {
93
        this.path = path;
94
    }
95
96
    @Override
97
    public boolean equals(Object o) {
98 2 1. equals : removed conditional - replaced equality check with true → NO_COVERAGE
2. equals : replaced boolean return with false for com/fwmotion/threescale/cms/model/CmsSection::equals → NO_COVERAGE
        if (this == o) return true;
99
100 3 1. equals : replaced boolean return with true for com/fwmotion/threescale/cms/model/CmsSection::equals → NO_COVERAGE
2. equals : removed conditional - replaced equality check with false → NO_COVERAGE
3. equals : removed conditional - replaced equality check with true → NO_COVERAGE
        if (!(o instanceof CmsSection that)) return false;
101
102 2 1. equals : replaced boolean return with false for com/fwmotion/threescale/cms/model/CmsSection::equals → NO_COVERAGE
2. equals : replaced boolean return with true for com/fwmotion/threescale/cms/model/CmsSection::equals → NO_COVERAGE
        return new EqualsBuilder().append(getId(), that.getId()).isEquals();
103
    }
104
105
    @Override
106
    public int hashCode() {
107 1 1. hashCode : replaced int return with 0 for com/fwmotion/threescale/cms/model/CmsSection::hashCode → NO_COVERAGE
        return new HashCodeBuilder(17, 37).append(getId()).toHashCode();
108
    }
109
110
    @Override
111
    public String toString() {
112 1 1. toString : replaced return value with "" for com/fwmotion/threescale/cms/model/CmsSection::toString → NO_COVERAGE
        return new ToStringBuilder(this)
113
            .append("createdAt", createdAt)
114
            .append("updatedAt", updatedAt)
115
            .append("id", id)
116
            .append("systemName", systemName)
117
            .append("parentId", parentId)
118
            .append("title", title)
119
            .append("public", _public)
120
            .append("path", path)
121
            .toString();
122
    }
123
}

Mutations

25

1.1
Location : getType
Killed by : com.fwmotion.threescale.cms.ThreescaleCmsClientImplUnitTest.[engine:junit-jupiter]/[class:com.fwmotion.threescale.cms.ThreescaleCmsClientImplUnitTest]/[method:delete_Section()]
replaced return value with null for com/fwmotion/threescale/cms/model/CmsSection::getType → KILLED

30

1.1
Location : getCreatedAt
Killed by : com.fwmotion.threescale.cms.ThreescaleCmsClientImplUnitTest.[engine:junit-jupiter]/[class:com.fwmotion.threescale.cms.ThreescaleCmsClientImplUnitTest]/[method:listSections()]
replaced return value with null for com/fwmotion/threescale/cms/model/CmsSection::getCreatedAt → KILLED

39

1.1
Location : getUpdatedAt
Killed by : com.fwmotion.threescale.cms.ThreescaleCmsClientImplUnitTest.[engine:junit-jupiter]/[class:com.fwmotion.threescale.cms.ThreescaleCmsClientImplUnitTest]/[method:listSections()]
replaced return value with null for com/fwmotion/threescale/cms/model/CmsSection::getUpdatedAt → KILLED

49

1.1
Location : getId
Killed by : com.fwmotion.threescale.cms.ThreescaleCmsClientImplUnitTest.[engine:junit-jupiter]/[class:com.fwmotion.threescale.cms.ThreescaleCmsClientImplUnitTest]/[method:save_NewSectionWithTitle()]
replaced Long return value with 0L for com/fwmotion/threescale/cms/model/CmsSection::getId → KILLED

57

1.1
Location : getSystemName
Killed by : com.fwmotion.threescale.cms.ThreescaleCmsClientImplUnitTest.[engine:junit-jupiter]/[class:com.fwmotion.threescale.cms.ThreescaleCmsClientImplUnitTest]/[method:save_NewSectionNoTitle()]
replaced return value with "" for com/fwmotion/threescale/cms/model/CmsSection::getSystemName → KILLED

65

1.1
Location : getParentId
Killed by : com.fwmotion.threescale.cms.ThreescaleCmsClientImplUnitTest.[engine:junit-jupiter]/[class:com.fwmotion.threescale.cms.ThreescaleCmsClientImplUnitTest]/[method:listSections()]
replaced Long return value with 0L for com/fwmotion/threescale/cms/model/CmsSection::getParentId → KILLED

73

1.1
Location : getTitle
Killed by : com.fwmotion.threescale.cms.ThreescaleCmsClientImplUnitTest.[engine:junit-jupiter]/[class:com.fwmotion.threescale.cms.ThreescaleCmsClientImplUnitTest]/[method:save_NewSectionWithTitle()]
replaced return value with "" for com/fwmotion/threescale/cms/model/CmsSection::getTitle → KILLED

81

1.1
Location : getPublic
Killed by : none
replaced Boolean return with True for com/fwmotion/threescale/cms/model/CmsSection::getPublic → SURVIVED

2.2
Location : getPublic
Killed by : com.fwmotion.threescale.cms.ThreescaleCmsClientImplUnitTest.[engine:junit-jupiter]/[class:com.fwmotion.threescale.cms.ThreescaleCmsClientImplUnitTest]/[method:listSections()]
replaced Boolean return with False for com/fwmotion/threescale/cms/model/CmsSection::getPublic → KILLED

89

1.1
Location : getPath
Killed by : com.fwmotion.threescale.cms.ThreescaleCmsClientImplUnitTest.[engine:junit-jupiter]/[class:com.fwmotion.threescale.cms.ThreescaleCmsClientImplUnitTest]/[method:listSections()]
replaced return value with "" for com/fwmotion/threescale/cms/model/CmsSection::getPath → KILLED

98

1.1
Location : equals
Killed by : none
removed conditional - replaced equality check with true → NO_COVERAGE

2.2
Location : equals
Killed by : none
replaced boolean return with false for com/fwmotion/threescale/cms/model/CmsSection::equals → NO_COVERAGE

100

1.1
Location : equals
Killed by : none
replaced boolean return with true for com/fwmotion/threescale/cms/model/CmsSection::equals → NO_COVERAGE

2.2
Location : equals
Killed by : none
removed conditional - replaced equality check with false → NO_COVERAGE

3.3
Location : equals
Killed by : none
removed conditional - replaced equality check with true → NO_COVERAGE

102

1.1
Location : equals
Killed by : none
replaced boolean return with false for com/fwmotion/threescale/cms/model/CmsSection::equals → NO_COVERAGE

2.2
Location : equals
Killed by : none
replaced boolean return with true for com/fwmotion/threescale/cms/model/CmsSection::equals → NO_COVERAGE

107

1.1
Location : hashCode
Killed by : none
replaced int return with 0 for com/fwmotion/threescale/cms/model/CmsSection::hashCode → NO_COVERAGE

112

1.1
Location : toString
Killed by : none
replaced return value with "" for com/fwmotion/threescale/cms/model/CmsSection::toString → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.15.3