|
1
|
|
package edu.ucsb.cs156.happiercows.controllers; |
|
2
|
|
|
|
3
|
|
import com.fasterxml.jackson.core.JsonProcessingException; |
|
4
|
|
import com.fasterxml.jackson.databind.ObjectMapper; |
|
5
|
|
|
|
6
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
7
|
|
|
|
8
|
|
import org.springframework.security.access.prepost.PreAuthorize; |
|
9
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
10
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
11
|
|
import org.springframework.web.bind.annotation.RequestParam; |
|
12
|
|
import org.springframework.web.bind.annotation.RestController; |
|
13
|
|
|
|
14
|
|
import edu.ucsb.cs156.happiercows.repositories.FarmerRepository; |
|
15
|
|
import edu.ucsb.cs156.happiercows.repositories.GameRepository; |
|
16
|
|
import edu.ucsb.cs156.happiercows.entities.User; |
|
17
|
|
import edu.ucsb.cs156.happiercows.entities.Farmer; |
|
18
|
|
import edu.ucsb.cs156.happiercows.entities.FarmerActivity; |
|
19
|
|
import edu.ucsb.cs156.happiercows.entities.Game; |
|
20
|
|
import edu.ucsb.cs156.happiercows.errors.EntityNotFoundException; |
|
21
|
|
import edu.ucsb.cs156.happiercows.errors.NoCowsException; |
|
22
|
|
import edu.ucsb.cs156.happiercows.errors.NotEnoughMoneyException; |
|
23
|
|
import edu.ucsb.cs156.happiercows.errors.GameHiddenException; |
|
24
|
|
import edu.ucsb.cs156.happiercows.errors.NotEnrolledInCourseAssociatedWithGameException; |
|
25
|
|
import edu.ucsb.cs156.happiercows.models.FarmerWithStudentStatus; |
|
26
|
|
import edu.ucsb.cs156.happiercows.services.CourseAccessService; |
|
27
|
|
import edu.ucsb.cs156.happiercows.services.FarmerActivityService; |
|
28
|
|
|
|
29
|
|
import java.util.ArrayList; |
|
30
|
|
import java.util.List; |
|
31
|
|
|
|
32
|
|
import io.swagger.v3.oas.annotations.tags.Tag; |
|
33
|
|
import io.swagger.v3.oas.annotations.Operation; |
|
34
|
|
import io.swagger.v3.oas.annotations.Parameter; |
|
35
|
|
|
|
36
|
|
import org.springframework.http.ResponseEntity; |
|
37
|
|
import org.springframework.web.bind.annotation.PutMapping; |
|
38
|
|
import org.springframework.transaction.annotation.Transactional; |
|
39
|
|
|
|
40
|
|
import edu.ucsb.cs156.happiercows.entities.CowHerd; |
|
41
|
|
import edu.ucsb.cs156.happiercows.repositories.CowHerdRepository; |
|
42
|
|
|
|
43
|
|
|
|
44
|
|
|
|
45
|
|
@Tag(name = "User Game") |
|
46
|
|
@RequestMapping("/api/farmer") |
|
47
|
|
@RestController |
|
48
|
|
public class FarmerController extends ApiController { |
|
49
|
|
|
|
50
|
|
@Autowired |
|
51
|
|
private FarmerRepository farmerRepository; |
|
52
|
|
|
|
53
|
|
|
|
54
|
|
@Autowired |
|
55
|
|
private CowHerdRepository cowHerdRepository; |
|
56
|
|
|
|
57
|
|
@Autowired |
|
58
|
|
private GameRepository gameRepository; |
|
59
|
|
|
|
60
|
|
@Autowired |
|
61
|
|
ObjectMapper mapper; |
|
62
|
|
|
|
63
|
|
@Autowired |
|
64
|
|
private CourseAccessService courseAccessService; |
|
65
|
|
|
|
66
|
|
@Autowired |
|
67
|
|
private FarmerActivityService farmerActivityService; |
|
68
|
|
|
|
69
|
|
@Operation(summary = "Get a specific user game (admin only)") |
|
70
|
|
@PreAuthorize("hasRole('ROLE_ADMIN')") |
|
71
|
|
@GetMapping("") |
|
72
|
|
public Farmer getFarmerById( |
|
73
|
|
@Parameter(name="userId") @RequestParam Long userId, |
|
74
|
|
@Parameter(name="gameId") @RequestParam Long gameId) throws JsonProcessingException { |
|
75
|
|
|
|
76
|
|
Farmer farmer = farmerRepository.findByGameIdAndUserId(gameId, userId) |
|
77
|
|
.orElseThrow( |
|
78
|
1
1. lambda$getFarmerById$0 : replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::lambda$getFarmerById$0 → KILLED
|
() -> new EntityNotFoundException(Farmer.class, "gameId", gameId, "userId", userId)); |
|
79
|
1
1. getFarmerById : replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::getFarmerById → KILLED
|
return farmer; |
|
80
|
|
} |
|
81
|
|
|
|
82
|
|
@Operation(summary = "Get a user game for current user") |
|
83
|
|
@PreAuthorize("hasRole('ROLE_USER')") |
|
84
|
|
@GetMapping("/forcurrentuser") |
|
85
|
|
public Farmer getFarmerById( |
|
86
|
|
@Parameter(name="gameId") @RequestParam Long gameId) throws JsonProcessingException { |
|
87
|
|
|
|
88
|
|
User u = getCurrentUser().getUser(); |
|
89
|
|
Long userId = u.getId(); |
|
90
|
|
Game game = gameRepository.findById(gameId) |
|
91
|
1
1. lambda$getFarmerById$1 : replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::lambda$getFarmerById$1 → KILLED
|
.orElseThrow(() -> new EntityNotFoundException("Game", gameId)); |
|
92
|
1
1. getFarmerById : removed call to edu/ucsb/cs156/happiercows/controllers/FarmerController::ensureUserCanAccessCourseLinkedGame → KILLED
|
ensureUserCanAccessCourseLinkedGame(u, game); |
|
93
|
|
Farmer farmer = farmerRepository.findByGameIdAndUserId(gameId, userId) |
|
94
|
|
.orElseThrow( |
|
95
|
1
1. lambda$getFarmerById$2 : replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::lambda$getFarmerById$2 → KILLED
|
() -> new EntityNotFoundException(Farmer.class, "gameId", gameId, "userId", userId)); |
|
96
|
1
1. getFarmerById : replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::getFarmerById → KILLED
|
return farmer; |
|
97
|
|
} |
|
98
|
|
|
|
99
|
|
@Operation(summary = "Buy a cow, totalWealth updated") |
|
100
|
|
@PreAuthorize("hasRole('ROLE_USER')") |
|
101
|
|
@PutMapping("/buy") |
|
102
|
|
public ResponseEntity<String> putFarmerByIdBuy( |
|
103
|
|
@Parameter(name="gameId") @RequestParam Long gameId, |
|
104
|
|
@Parameter(name="numCows") @RequestParam int numCows) throws NotEnoughMoneyException, JsonProcessingException{ |
|
105
|
|
|
|
106
|
|
User u = getCurrentUser().getUser(); |
|
107
|
|
Long userId = u.getId(); |
|
108
|
|
|
|
109
|
|
Game game = gameRepository.findById(gameId).orElseThrow( |
|
110
|
1
1. lambda$putFarmerByIdBuy$0 : replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::lambda$putFarmerByIdBuy$0 → KILLED
|
()->new EntityNotFoundException("Game", gameId)); |
|
111
|
|
|
|
112
|
1
1. putFarmerByIdBuy : removed call to edu/ucsb/cs156/happiercows/controllers/FarmerController::ensureUserCanAccessCourseLinkedGame → KILLED
|
ensureUserCanAccessCourseLinkedGame(u, game); |
|
113
|
|
|
|
114
|
1
1. putFarmerByIdBuy : negated conditional → KILLED
|
if (game.isHidden()) { |
|
115
|
|
throw new GameHiddenException(gameId); |
|
116
|
|
} |
|
117
|
|
|
|
118
|
|
Farmer farmer = farmerRepository.findByGameIdAndUserId(gameId, userId) |
|
119
|
|
.orElseThrow( |
|
120
|
1
1. lambda$putFarmerByIdBuy$1 : replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::lambda$putFarmerByIdBuy$1 → KILLED
|
() -> new EntityNotFoundException(Farmer.class, "gameId", gameId, "userId", userId)); |
|
121
|
|
|
|
122
|
3
1. putFarmerByIdBuy : negated conditional → KILLED
2. putFarmerByIdBuy : changed conditional boundary → KILLED
3. putFarmerByIdBuy : Replaced double multiplication with division → KILLED
|
if(farmer.getTotalWealth() >= (game.getCowPrice() * numCows)){ |
|
123
|
3
1. putFarmerByIdBuy : removed call to edu/ucsb/cs156/happiercows/entities/Farmer::setTotalWealth → KILLED
2. putFarmerByIdBuy : Replaced double multiplication with division → KILLED
3. putFarmerByIdBuy : Replaced double subtraction with addition → KILLED
|
farmer.setTotalWealth(farmer.getTotalWealth() - (game.getCowPrice() * numCows)); |
|
124
|
2
1. putFarmerByIdBuy : removed call to edu/ucsb/cs156/happiercows/entities/Farmer::setNumOfCows → KILLED
2. putFarmerByIdBuy : Replaced integer addition with subtraction → KILLED
|
farmer.setNumOfCows(farmer.getNumOfCows() + numCows); |
|
125
|
2
1. putFarmerByIdBuy : removed call to edu/ucsb/cs156/happiercows/entities/Farmer::setCowsBought → KILLED
2. putFarmerByIdBuy : Replaced integer addition with subtraction → KILLED
|
farmer.setCowsBought(farmer.getCowsBought() + numCows); |
|
126
|
|
} |
|
127
|
|
else{ |
|
128
|
|
throw new NotEnoughMoneyException("You need more money!"); |
|
129
|
|
} |
|
130
|
|
farmerRepository.save(farmer); |
|
131
|
|
CowHerd herd = CowHerd.builder() |
|
132
|
|
.farmer(farmer) |
|
133
|
|
.numOfCows(numCows) |
|
134
|
|
.cowHealth(100) |
|
135
|
|
.build(); |
|
136
|
|
|
|
137
|
|
cowHerdRepository.save(herd); |
|
138
|
|
|
|
139
|
1
1. putFarmerByIdBuy : removed call to edu/ucsb/cs156/happiercows/services/FarmerActivityService::recordActivityIfStudentMatch → KILLED
|
farmerActivityService.recordActivityIfStudentMatch( |
|
140
|
|
u, game, farmer, FarmerActivity.ACTIVITY_TYPE_BUY, numCows); |
|
141
|
|
|
|
142
|
|
String body = mapper.writeValueAsString(farmer); |
|
143
|
1
1. putFarmerByIdBuy : replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::putFarmerByIdBuy → KILLED
|
return ResponseEntity.ok().body(body); |
|
144
|
|
} |
|
145
|
|
|
|
146
|
|
@Operation(summary = "Sell a cow, totalWealth updated") |
|
147
|
|
@PreAuthorize("hasRole('ROLE_USER')") |
|
148
|
|
@PutMapping("/sell") |
|
149
|
|
public ResponseEntity<String> putFarmerByIdSell( |
|
150
|
|
@Parameter(name="gameId") @RequestParam Long gameId, |
|
151
|
|
@Parameter(name="numCows") @RequestParam int numCows) throws NoCowsException, JsonProcessingException { |
|
152
|
|
User u = getCurrentUser().getUser(); |
|
153
|
|
Long userId = u.getId(); |
|
154
|
|
|
|
155
|
|
Game game = gameRepository.findById(gameId).orElseThrow( |
|
156
|
1
1. lambda$putFarmerByIdSell$0 : replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::lambda$putFarmerByIdSell$0 → KILLED
|
()->new EntityNotFoundException("Game", gameId)); |
|
157
|
|
|
|
158
|
1
1. putFarmerByIdSell : removed call to edu/ucsb/cs156/happiercows/controllers/FarmerController::ensureUserCanAccessCourseLinkedGame → KILLED
|
ensureUserCanAccessCourseLinkedGame(u, game); |
|
159
|
|
|
|
160
|
1
1. putFarmerByIdSell : negated conditional → KILLED
|
if (game.isHidden()) { |
|
161
|
|
throw new GameHiddenException(gameId); |
|
162
|
|
} |
|
163
|
|
|
|
164
|
|
Farmer farmer = farmerRepository.findByGameIdAndUserId(gameId, userId) |
|
165
|
|
.orElseThrow( |
|
166
|
1
1. lambda$putFarmerByIdSell$1 : replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::lambda$putFarmerByIdSell$1 → KILLED
|
() -> new EntityNotFoundException(Farmer.class, "gameId", gameId, "userId", userId)); |
|
167
|
|
|
|
168
|
|
|
|
169
|
2
1. putFarmerByIdSell : negated conditional → KILLED
2. putFarmerByIdSell : changed conditional boundary → KILLED
|
if(farmer.getNumOfCows() >= numCows ){ |
|
170
|
2
1. putFarmerByIdSell : Replaced double multiplication with division → KILLED
2. putFarmerByIdSell : Replaced double division with multiplication → KILLED
|
double cowValue = game.getCowPrice() * farmer.getCowHealth() / 100; |
|
171
|
3
1. putFarmerByIdSell : Replaced double addition with subtraction → KILLED
2. putFarmerByIdSell : removed call to edu/ucsb/cs156/happiercows/entities/Farmer::setTotalWealth → KILLED
3. putFarmerByIdSell : Replaced double multiplication with division → KILLED
|
farmer.setTotalWealth(farmer.getTotalWealth() + (cowValue * numCows)); |
|
172
|
2
1. putFarmerByIdSell : removed call to edu/ucsb/cs156/happiercows/entities/Farmer::setNumOfCows → KILLED
2. putFarmerByIdSell : Replaced integer subtraction with addition → KILLED
|
farmer.setNumOfCows(farmer.getNumOfCows() - numCows); |
|
173
|
2
1. putFarmerByIdSell : removed call to edu/ucsb/cs156/happiercows/entities/Farmer::setCowsSold → KILLED
2. putFarmerByIdSell : Replaced integer addition with subtraction → KILLED
|
farmer.setCowsSold(farmer.getCowsSold() + numCows); |
|
174
|
|
} |
|
175
|
|
else{ |
|
176
|
|
throw new NoCowsException("You do not have enough cows to sell!"); |
|
177
|
|
} |
|
178
|
|
|
|
179
|
|
farmerRepository.save(farmer); |
|
180
|
|
|
|
181
|
1
1. putFarmerByIdSell : removed call to edu/ucsb/cs156/happiercows/services/FarmerActivityService::recordActivityIfStudentMatch → KILLED
|
farmerActivityService.recordActivityIfStudentMatch( |
|
182
|
|
u, game, farmer, FarmerActivity.ACTIVITY_TYPE_SELL, numCows); |
|
183
|
|
|
|
184
|
|
String body = mapper.writeValueAsString(farmer); |
|
185
|
1
1. putFarmerByIdSell : replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::putFarmerByIdSell → KILLED
|
return ResponseEntity.ok().body(body); |
|
186
|
|
} |
|
187
|
|
|
|
188
|
|
@Operation(summary = "Sell cows from a herd") |
|
189
|
|
@PreAuthorize("hasRole('ROLE_USER')") |
|
190
|
|
@PutMapping("/sell/herd") |
|
191
|
|
@Transactional |
|
192
|
|
public ResponseEntity<String> sellCowsFromHerd( |
|
193
|
|
@RequestParam Long gameId, |
|
194
|
|
@RequestParam Long herdId, |
|
195
|
|
@RequestParam int numCows) |
|
196
|
|
throws NoCowsException, JsonProcessingException { |
|
197
|
|
User u = getCurrentUser().getUser(); |
|
198
|
|
Long userId = u.getId(); |
|
199
|
|
|
|
200
|
|
Game game = gameRepository.findById(gameId).orElseThrow( |
|
201
|
1
1. lambda$sellCowsFromHerd$0 : replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::lambda$sellCowsFromHerd$0 → KILLED
|
() -> new EntityNotFoundException("Game", gameId)); |
|
202
|
|
|
|
203
|
1
1. sellCowsFromHerd : removed call to edu/ucsb/cs156/happiercows/controllers/FarmerController::ensureUserCanAccessCourseLinkedGame → KILLED
|
ensureUserCanAccessCourseLinkedGame(u, game); |
|
204
|
|
|
|
205
|
1
1. sellCowsFromHerd : negated conditional → KILLED
|
if (game.isHidden()) { |
|
206
|
|
throw new GameHiddenException(gameId); |
|
207
|
|
} |
|
208
|
|
|
|
209
|
|
Farmer farmer = farmerRepository.findByGameIdAndUserId(gameId, userId) |
|
210
|
1
1. lambda$sellCowsFromHerd$1 : replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::lambda$sellCowsFromHerd$1 → KILLED
|
.orElseThrow(() -> new EntityNotFoundException( |
|
211
|
|
Farmer.class, "gameId", gameId, "userId", userId)); |
|
212
|
|
|
|
213
|
|
CowHerd herd = cowHerdRepository.findById(herdId) |
|
214
|
1
1. lambda$sellCowsFromHerd$2 : replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::lambda$sellCowsFromHerd$2 → KILLED
|
.orElseThrow(() -> new EntityNotFoundException("CowHerd", herdId)); |
|
215
|
|
|
|
216
|
1
1. sellCowsFromHerd : negated conditional → KILLED
|
if (herd.getFarmer().getUserId() != userId.longValue() |
|
217
|
1
1. sellCowsFromHerd : negated conditional → KILLED
|
|| herd.getFarmer().getGameId() != gameId.longValue()) { |
|
218
|
|
throw new EntityNotFoundException("CowHerd", herdId); |
|
219
|
|
} |
|
220
|
|
|
|
221
|
4
1. sellCowsFromHerd : changed conditional boundary → KILLED
2. sellCowsFromHerd : negated conditional → KILLED
3. sellCowsFromHerd : changed conditional boundary → KILLED
4. sellCowsFromHerd : negated conditional → KILLED
|
if (numCows <= 0 || numCows > herd.getNumOfCows() |
|
222
|
2
1. sellCowsFromHerd : negated conditional → KILLED
2. sellCowsFromHerd : changed conditional boundary → KILLED
|
|| numCows > farmer.getNumOfCows()) { |
|
223
|
|
throw new NoCowsException("You do not have enough cows to sell!"); |
|
224
|
|
} |
|
225
|
|
|
|
226
|
2
1. sellCowsFromHerd : Replaced double division with multiplication → KILLED
2. sellCowsFromHerd : Replaced double multiplication with division → KILLED
|
double cowValue = game.getCowPrice() * herd.getCowHealth() / 100; |
|
227
|
|
|
|
228
|
3
1. sellCowsFromHerd : removed call to edu/ucsb/cs156/happiercows/entities/Farmer::setTotalWealth → KILLED
2. sellCowsFromHerd : Replaced double addition with subtraction → KILLED
3. sellCowsFromHerd : Replaced double multiplication with division → KILLED
|
farmer.setTotalWealth(farmer.getTotalWealth() + cowValue * numCows); |
|
229
|
2
1. sellCowsFromHerd : Replaced integer subtraction with addition → KILLED
2. sellCowsFromHerd : removed call to edu/ucsb/cs156/happiercows/entities/Farmer::setNumOfCows → KILLED
|
farmer.setNumOfCows(farmer.getNumOfCows() - numCows); |
|
230
|
2
1. sellCowsFromHerd : Replaced integer addition with subtraction → KILLED
2. sellCowsFromHerd : removed call to edu/ucsb/cs156/happiercows/entities/Farmer::setCowsSold → KILLED
|
farmer.setCowsSold(farmer.getCowsSold() + numCows); |
|
231
|
|
|
|
232
|
2
1. sellCowsFromHerd : Replaced integer subtraction with addition → KILLED
2. sellCowsFromHerd : removed call to edu/ucsb/cs156/happiercows/entities/CowHerd::setNumOfCows → KILLED
|
herd.setNumOfCows(herd.getNumOfCows() - numCows); |
|
233
|
|
|
|
234
|
|
cowHerdRepository.save(herd); |
|
235
|
|
farmerRepository.save(farmer); |
|
236
|
|
|
|
237
|
1
1. sellCowsFromHerd : removed call to edu/ucsb/cs156/happiercows/services/FarmerActivityService::recordActivityIfStudentMatch → KILLED
|
farmerActivityService.recordActivityIfStudentMatch( |
|
238
|
|
u, game, farmer, FarmerActivity.ACTIVITY_TYPE_SELL, numCows); |
|
239
|
|
|
|
240
|
|
String body = mapper.writeValueAsString(farmer); |
|
241
|
1
1. sellCowsFromHerd : replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::sellCowsFromHerd → KILLED
|
return ResponseEntity.ok().body(body); |
|
242
|
|
} |
|
243
|
|
|
|
244
|
|
@Operation(summary = "Get all user game for a specific game") |
|
245
|
|
@PreAuthorize("hasAnyRole('ROLE_USER', 'ROLE_ADMIN')") |
|
246
|
|
@GetMapping("/game/all") |
|
247
|
|
public List<FarmerWithStudentStatus> getFarmersByGameId( |
|
248
|
|
@Parameter(name="gameId") @RequestParam Long gameId) { |
|
249
|
|
|
|
250
|
|
Game game = gameRepository.findById(gameId) |
|
251
|
1
1. lambda$getFarmersByGameId$0 : replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::lambda$getFarmersByGameId$0 → KILLED
|
.orElseThrow(() -> new EntityNotFoundException("Game", gameId)); |
|
252
|
|
|
|
253
|
|
List<FarmerWithStudentStatus> result = new ArrayList<>(); |
|
254
|
|
for (Farmer farmer : farmerRepository.findByGameId(gameId)) { |
|
255
|
|
boolean isStudent = courseAccessService |
|
256
|
|
.findMatchingStudentForCourseLinkedGame(farmer.getUser(), game) |
|
257
|
|
.isPresent(); |
|
258
|
|
|
|
259
|
|
result.add(FarmerWithStudentStatus.builder() |
|
260
|
|
.userId(farmer.getUserId()) |
|
261
|
|
.gameId(farmer.getGameId()) |
|
262
|
|
.username(farmer.getUsername()) |
|
263
|
|
.totalWealth(farmer.getTotalWealth()) |
|
264
|
|
.numOfCows(farmer.getNumOfCows()) |
|
265
|
|
.cowHealth(farmer.getCowHealth()) |
|
266
|
|
.cowsBought(farmer.getCowsBought()) |
|
267
|
|
.cowsSold(farmer.getCowsSold()) |
|
268
|
|
.cowDeaths(farmer.getCowDeaths()) |
|
269
|
|
.student(isStudent) |
|
270
|
|
.build()); |
|
271
|
|
} |
|
272
|
1
1. getFarmersByGameId : replaced return value with Collections.emptyList for edu/ucsb/cs156/happiercows/controllers/FarmerController::getFarmersByGameId → KILLED
|
return result; |
|
273
|
|
} |
|
274
|
|
|
|
275
|
|
private void ensureUserCanAccessCourseLinkedGame(User user, Game game) { |
|
276
|
2
1. ensureUserCanAccessCourseLinkedGame : negated conditional → KILLED
2. ensureUserCanAccessCourseLinkedGame : negated conditional → KILLED
|
if (game.getCourseId() != null && !courseAccessService.isEligibleForGame(user, game)) { |
|
277
|
|
throw new NotEnrolledInCourseAssociatedWithGameException(); |
|
278
|
|
} |
|
279
|
|
} |
|
280
|
|
|
|
281
|
|
} |
| | Mutations |
| 78 |
|
1.1 Location : lambda$getFarmerById$0 Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_getFarmerById_nonexists_admin()] replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::lambda$getFarmerById$0 → KILLED
|
| 79 |
|
1.1 Location : getFarmerById Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_getFarmerById_exists_admin()] replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::getFarmerById → KILLED
|
| 91 |
|
1.1 Location : lambda$getFarmerById$1 Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_getFarmerById_when_game_does_not_exist()] replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::lambda$getFarmerById$1 → KILLED
|
| 92 |
|
1.1 Location : getFarmerById Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_getFarmerById_course_linked_game_requires_current_enrollment()] removed call to edu/ucsb/cs156/happiercows/controllers/FarmerController::ensureUserCanAccessCourseLinkedGame → KILLED
|
| 95 |
|
1.1 Location : lambda$getFarmerById$2 Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_getFarmerById_nonexists()] replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::lambda$getFarmerById$2 → KILLED
|
| 96 |
|
1.1 Location : getFarmerById Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_getFarmerById_exists()] replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::getFarmerById → KILLED
|
| 110 |
|
1.1 Location : lambda$putFarmerByIdBuy$0 Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_buyCow_game_does_not_exist()] replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::lambda$putFarmerByIdBuy$0 → KILLED
|
| 112 |
|
1.1 Location : putFarmerByIdBuy Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_buyCow_course_linked_game_requires_current_enrollment()] removed call to edu/ucsb/cs156/happiercows/controllers/FarmerController::ensureUserCanAccessCourseLinkedGame → KILLED
|
| 114 |
|
1.1 Location : putFarmerByIdBuy Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_buyCow_for_user_not_in_game()] negated conditional → KILLED
|
| 120 |
|
1.1 Location : lambda$putFarmerByIdBuy$1 Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_buyCow_for_user_not_in_game()] replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::lambda$putFarmerByIdBuy$1 → KILLED
|
| 122 |
|
1.1 Location : putFarmerByIdBuy Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_BuyCow_not_enough_money()] negated conditional → KILLED
2.2 Location : putFarmerByIdBuy Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_BuyCow_game_exists_user_has_exact_amount_needed()] changed conditional boundary → KILLED
3.3 Location : putFarmerByIdBuy Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_BuyCow_not_enough_money()] Replaced double multiplication with division → KILLED
|
| 123 |
|
1.1 Location : putFarmerByIdBuy Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_BuyCow_game_exists_user_has_exact_amount_needed()] removed call to edu/ucsb/cs156/happiercows/entities/Farmer::setTotalWealth → KILLED
2.2 Location : putFarmerByIdBuy Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_BuyCow_course_linked_game_allows_current_enrollment()] Replaced double multiplication with division → KILLED
3.3 Location : putFarmerByIdBuy Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_BuyCow_game_exists_user_has_exact_amount_needed()] Replaced double subtraction with addition → KILLED
|
| 124 |
|
1.1 Location : putFarmerByIdBuy Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_BuyCow_game_exists_user_has_exact_amount_needed()] removed call to edu/ucsb/cs156/happiercows/entities/Farmer::setNumOfCows → KILLED
2.2 Location : putFarmerByIdBuy Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_BuyCow_game_exists_user_has_exact_amount_needed()] Replaced integer addition with subtraction → KILLED
|
| 125 |
|
1.1 Location : putFarmerByIdBuy Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_BuyCow_game_exists_user_has_exact_amount_needed()] removed call to edu/ucsb/cs156/happiercows/entities/Farmer::setCowsBought → KILLED
2.2 Location : putFarmerByIdBuy Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_BuyCow_game_exists_user_has_exact_amount_needed()] Replaced integer addition with subtraction → KILLED
|
| 139 |
|
1.1 Location : putFarmerByIdBuy Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_BuyCow_game_exists()] removed call to edu/ucsb/cs156/happiercows/services/FarmerActivityService::recordActivityIfStudentMatch → KILLED
|
| 143 |
|
1.1 Location : putFarmerByIdBuy Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_BuyCow_game_exists_user_has_exact_amount_needed()] replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::putFarmerByIdBuy → KILLED
|
| 156 |
|
1.1 Location : lambda$putFarmerByIdSell$0 Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_sellCow_game_does_not_exist()] replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::lambda$putFarmerByIdSell$0 → KILLED
|
| 158 |
|
1.1 Location : putFarmerByIdSell Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCow_course_linked_game_allows_current_enrollment()] removed call to edu/ucsb/cs156/happiercows/controllers/FarmerController::ensureUserCanAccessCourseLinkedGame → KILLED
|
| 160 |
|
1.1 Location : putFarmerByIdSell Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_sellCow_for_user_not_in_game()] negated conditional → KILLED
|
| 166 |
|
1.1 Location : lambda$putFarmerByIdSell$1 Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_sellCow_for_user_not_in_game()] replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::lambda$putFarmerByIdSell$1 → KILLED
|
| 169 |
|
1.1 Location : putFarmerByIdSell Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCow_game_exists_no_cow_to_sell()] negated conditional → KILLED
2.2 Location : putFarmerByIdSell Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCow_game_exists()] changed conditional boundary → KILLED
|
| 170 |
|
1.1 Location : putFarmerByIdSell Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCow_game_exists()] Replaced double multiplication with division → KILLED
2.2 Location : putFarmerByIdSell Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCow_game_exists()] Replaced double division with multiplication → KILLED
|
| 171 |
|
1.1 Location : putFarmerByIdSell Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCow_game_exists()] Replaced double addition with subtraction → KILLED
2.2 Location : putFarmerByIdSell Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCow_game_exists()] removed call to edu/ucsb/cs156/happiercows/entities/Farmer::setTotalWealth → KILLED
3.3 Location : putFarmerByIdSell Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCow_game_exists()] Replaced double multiplication with division → KILLED
|
| 172 |
|
1.1 Location : putFarmerByIdSell Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCow_game_exists()] removed call to edu/ucsb/cs156/happiercows/entities/Farmer::setNumOfCows → KILLED
2.2 Location : putFarmerByIdSell Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCow_game_exists()] Replaced integer subtraction with addition → KILLED
|
| 173 |
|
1.1 Location : putFarmerByIdSell Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCow_game_exists()] removed call to edu/ucsb/cs156/happiercows/entities/Farmer::setCowsSold → KILLED
2.2 Location : putFarmerByIdSell Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCow_game_exists()] Replaced integer addition with subtraction → KILLED
|
| 181 |
|
1.1 Location : putFarmerByIdSell Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCow_game_exists()] removed call to edu/ucsb/cs156/happiercows/services/FarmerActivityService::recordActivityIfStudentMatch → KILLED
|
| 185 |
|
1.1 Location : putFarmerByIdSell Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCow_game_exists()] replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::putFarmerByIdSell → KILLED
|
| 201 |
|
1.1 Location : lambda$sellCowsFromHerd$0 Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCowsFromHerd_gameNotFound()] replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::lambda$sellCowsFromHerd$0 → KILLED
|
| 203 |
|
1.1 Location : sellCowsFromHerd Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCowsFromHerd_courseNotEnrolled()] removed call to edu/ucsb/cs156/happiercows/controllers/FarmerController::ensureUserCanAccessCourseLinkedGame → KILLED
|
| 205 |
|
1.1 Location : sellCowsFromHerd Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCowsFromHerd_farmerNotFound()] negated conditional → KILLED
|
| 210 |
|
1.1 Location : lambda$sellCowsFromHerd$1 Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCowsFromHerd_farmerNotFound()] replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::lambda$sellCowsFromHerd$1 → KILLED
|
| 214 |
|
1.1 Location : lambda$sellCowsFromHerd$2 Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCowsFromHerd_herdNotFound()] replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::lambda$sellCowsFromHerd$2 → KILLED
|
| 216 |
|
1.1 Location : sellCowsFromHerd Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCowsFromHerd_wrongFarmer()] negated conditional → KILLED
|
| 217 |
|
1.1 Location : sellCowsFromHerd Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCowsFromHerd_zeroCows()] negated conditional → KILLED
|
| 221 |
|
1.1 Location : sellCowsFromHerd Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCowsFromHerd_zeroCows()] changed conditional boundary → KILLED
2.2 Location : sellCowsFromHerd Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCowsFromHerd_sellAllCows()] negated conditional → KILLED
3.3 Location : sellCowsFromHerd Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCowsFromHerd_sellAllCows()] changed conditional boundary → KILLED
4.4 Location : sellCowsFromHerd Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCowsFromHerd_zeroCows()] negated conditional → KILLED
|
| 222 |
|
1.1 Location : sellCowsFromHerd Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCowsFromHerd_moreThanFarmerOwns()] negated conditional → KILLED
2.2 Location : sellCowsFromHerd Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCowsFromHerd_sellAllCows()] changed conditional boundary → KILLED
|
| 226 |
|
1.1 Location : sellCowsFromHerd Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCowsFromHerd_sellAllCows()] Replaced double division with multiplication → KILLED
2.2 Location : sellCowsFromHerd Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCowsFromHerd_sellAllCows()] Replaced double multiplication with division → KILLED
|
| 228 |
|
1.1 Location : sellCowsFromHerd Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCowsFromHerd_sellAllCows()] removed call to edu/ucsb/cs156/happiercows/entities/Farmer::setTotalWealth → KILLED
2.2 Location : sellCowsFromHerd Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCowsFromHerd_sellAllCows()] Replaced double addition with subtraction → KILLED
3.3 Location : sellCowsFromHerd Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCowsFromHerd_sellAllCows()] Replaced double multiplication with division → KILLED
|
| 229 |
|
1.1 Location : sellCowsFromHerd Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCowsFromHerd_sellAllCows()] Replaced integer subtraction with addition → KILLED
2.2 Location : sellCowsFromHerd Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCowsFromHerd_sellAllCows()] removed call to edu/ucsb/cs156/happiercows/entities/Farmer::setNumOfCows → KILLED
|
| 230 |
|
1.1 Location : sellCowsFromHerd Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCowsFromHerd_sellAllCows()] Replaced integer addition with subtraction → KILLED
2.2 Location : sellCowsFromHerd Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCowsFromHerd_sellAllCows()] removed call to edu/ucsb/cs156/happiercows/entities/Farmer::setCowsSold → KILLED
|
| 232 |
|
1.1 Location : sellCowsFromHerd Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCowsFromHerd_sellAllCows()] Replaced integer subtraction with addition → KILLED
2.2 Location : sellCowsFromHerd Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCowsFromHerd_sellAllCows()] removed call to edu/ucsb/cs156/happiercows/entities/CowHerd::setNumOfCows → KILLED
|
| 237 |
|
1.1 Location : sellCowsFromHerd Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCowsFromHerd()] removed call to edu/ucsb/cs156/happiercows/services/FarmerActivityService::recordActivityIfStudentMatch → KILLED
|
| 241 |
|
1.1 Location : sellCowsFromHerd Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCowsFromHerd()] replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::sellCowsFromHerd → KILLED
|
| 251 |
|
1.1 Location : lambda$getFarmersByGameId$0 Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_getAllFarmerById_game_does_not_exist()] replaced return value with null for edu/ucsb/cs156/happiercows/controllers/FarmerController::lambda$getFarmersByGameId$0 → KILLED
|
| 272 |
|
1.1 Location : getFarmersByGameId Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_getAllFarmerById_exists()] replaced return value with Collections.emptyList for edu/ucsb/cs156/happiercows/controllers/FarmerController::getFarmersByGameId → KILLED
|
| 276 |
|
1.1 Location : ensureUserCanAccessCourseLinkedGame Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCowsFromHerd_courseNotEnrolled()] negated conditional → KILLED
2.2 Location : ensureUserCanAccessCourseLinkedGame Killed by : edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.happiercows.controllers.FarmerControllerTests]/[method:test_SellCowsFromHerd_hiddenGame()] negated conditional → KILLED
|