ServedBookingPresenter.java

1
package io.github.marcopaglio.booking.presenter.served;
2
3
import java.time.LocalDate;
4
import java.util.Objects;
5
import java.util.UUID;
6
7
import org.apache.logging.log4j.LogManager;
8
import org.apache.logging.log4j.Logger;
9
10
import io.github.marcopaglio.booking.exception.DatabaseException;
11
import io.github.marcopaglio.booking.exception.InstanceAlreadyExistsException;
12
import io.github.marcopaglio.booking.exception.InstanceNotFoundException;
13
import io.github.marcopaglio.booking.model.Client;
14
import io.github.marcopaglio.booking.model.Reservation;
15
import io.github.marcopaglio.booking.presenter.BookingPresenter;
16
import io.github.marcopaglio.booking.service.BookingService;
17
import io.github.marcopaglio.booking.validator.ClientValidator;
18
import io.github.marcopaglio.booking.validator.ReservationValidator;
19
import io.github.marcopaglio.booking.view.BookingView;
20
21
/**
22
 * A concrete implementation of the presenter for the booking application using
23
 * a single view and delegating operations on repositories to a service layer.
24
 */
25
public class ServedBookingPresenter implements BookingPresenter {
26
	/**
27
	 * Creates meaningful logs on behalf of the class.
28
	 */
29
	private static final Logger LOGGER = LogManager.getLogger(ServedBookingPresenter.class);
30
31
	/**
32
	 * Displays changes of the model on a user interface.
33
	 */
34
	private BookingView view;
35
36
	/**
37
	 * Allows the presenter to interact with repositories.
38
	 */
39
	private BookingService bookingService;
40
41
	/**
42
	 * Validates inputs for creating {@code Client} entities.
43
	 */
44
	private ClientValidator clientValidator;
45
46
	/**
47
	 * Validates inputs for creating {@code Reservation} entities.
48
	 */
49
	private ReservationValidator reservationValidator;
50
51
	/**
52
	 * Constructs a presenter for the booking application with a view and a service.
53
	 * 
54
	 * @param view					the {@code View} used to show the user interface.
55
	 * @param bookingService		the {@code BookingService} used to interact with repositories.
56
	 * @param clientValidator		the inputs checker for {@code Client} entities. 
57
	 * @param reservationValidator	the inputs checker for {@code Reservation} entities.
58
	 */
59
	public ServedBookingPresenter(BookingView view, BookingService bookingService,
60
			ClientValidator clientValidator, ReservationValidator reservationValidator) {
61
		this.view = view;
62
		this.bookingService = bookingService;
63
		this.clientValidator = clientValidator;
64
		this.reservationValidator = reservationValidator;
65
	}
66
67
	/**
68
	 * Finds all the existing clients in the repository through the service layer and
69
	 * gives the list to the view for showing them.
70
	 */
71
	@Override
72
	public void allClients() {
73
		try {
74 1 1. allClients : removed call to io/github/marcopaglio/booking/view/BookingView::showAllClients → KILLED
			view.showAllClients(bookingService.findAllClients());
75
			LOGGER.info("All clients have been retrieved with success.");
76
		} catch(DatabaseException e) {
77
			LOGGER.warn(e.getMessage());
78 1 1. allClients : removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED
			view.showOperationError(databaseErrorMsg("updating clients"));
79
		}
80
	}
81
82
	/**
83
	 * Finds all the existing reservations in the repository through the service layer and
84
	 * gives the list to the view for showing them.
85
	 */
86
	@Override
87
	public void allReservations() {
88
		try {
89 1 1. allReservations : removed call to io/github/marcopaglio/booking/view/BookingView::showAllReservations → KILLED
			view.showAllReservations(bookingService.findAllReservations());
90
			LOGGER.info("All reservations have been retrieved with success.");
91
		} catch(DatabaseException e) {
92
			LOGGER.warn(e.getMessage());
93 1 1. allReservations : removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED
			view.showOperationError(databaseErrorMsg("updating reservations"));
94
		}
95
	}
96
97
	/**
98
	 * Finds all the existing entities in the repository through the service layer and
99
	 * gives the lists to the view for showing them.
100
	 */
101
	private void updateAll() {
102 1 1. updateAll : removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::allReservations → KILLED
		allReservations();
103 1 1. updateAll : removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::allClients → KILLED
		allClients();
104
	}
105
106
	/**
107
	 * Removes an existing client and all his reservations from the repository and notifies the 
108
	 * view about the changes.
109
	 * This method delegates its elimination and of all his reservations to the service layer.
110
	 *
111
	 * @param client	the client to delete.
112
	 */
113
	@Override
114
	public synchronized void deleteClient(Client client) {
115 1 1. deleteClient : removed conditional - replaced equality check with false → KILLED
		if (client == null) {
116
			LOGGER.warn("Client to delete cannot be null.");
117 1 1. deleteClient : removed call to io/github/marcopaglio/booking/view/BookingView::showFormError → KILLED
			view.showFormError("Select a client to delete.");
118
		} else {
119
			String firstName = client.getFirstName();
120
			String lastName = client.getLastName();
121
			try {
122 1 1. deleteClient : removed call to io/github/marcopaglio/booking/service/BookingService::removeClientNamed → KILLED
				bookingService.removeClientNamed(firstName, lastName);
123 1 1. deleteClient : removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::allReservations → KILLED
				allReservations();
124 1 1. deleteClient : removed call to io/github/marcopaglio/booking/view/BookingView::clientRemoved → KILLED
				view.clientRemoved(client);
125
				LOGGER.info(() -> String.format("%s and all his reservations have been deleted with success.", client.toString()));
126
			} catch (InstanceNotFoundException e) {
127
				LOGGER.warn(e.getMessage());
128 1 1. deleteClient : removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED
				view.showOperationError(instanceNotFoundErrorMsg(
129
						getClientStringToDisplay(firstName, lastName)));
130 1 1. deleteClient : removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED
				updateAll();
131
			} catch(DatabaseException e) {
132
				LOGGER.warn(e.getMessage());
133 1 1. deleteClient : removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED
				view.showOperationError(databaseErrorMsg("deleting "
134
						+ getClientStringToDisplay(firstName, lastName)));
135 1 1. deleteClient : removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED
				updateAll();
136
			}
137
		}
138
	}
139
140
	/**
141
	 * Removes an existing reservation from the repository and notifies the view about the changes.
142
	 * This method delegates its elimination to the service layer.
143
	 *
144
	 * @param reservation	the reservation to delete.
145
	 */
146
	@Override
147
	public synchronized void deleteReservation(Reservation reservation) {
148 1 1. deleteReservation : removed conditional - replaced equality check with false → KILLED
		if (reservation == null) {
149
			LOGGER.warn("Reservation to delete cannot be null.");
150 1 1. deleteReservation : removed call to io/github/marcopaglio/booking/view/BookingView::showFormError → KILLED
			view.showFormError("Select a reservation to delete.");
151
		} else {
152
			LocalDate localDate = reservation.getDate();
153
			try {
154 1 1. deleteReservation : removed call to io/github/marcopaglio/booking/service/BookingService::removeReservationOn → KILLED
				bookingService.removeReservationOn(localDate);
155 1 1. deleteReservation : removed call to io/github/marcopaglio/booking/view/BookingView::reservationRemoved → KILLED
				view.reservationRemoved(reservation);
156
				LOGGER.info(() -> String.format("%s has been deleted with success.", reservation.toString()));
157
			} catch (InstanceNotFoundException e) {
158
				LOGGER.warn(e.getMessage());
159 1 1. deleteReservation : removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED
				view.showOperationError(instanceNotFoundErrorMsg(
160
						getReservationStringToDisplay(localDate)));
161 1 1. deleteReservation : removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED
				updateAll();
162
			} catch(DatabaseException e) {
163
				LOGGER.warn(e.getMessage());
164 1 1. deleteReservation : removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED
				view.showOperationError(databaseErrorMsg("deleting "
165
						+ getReservationStringToDisplay(localDate)));
166 1 1. deleteReservation : removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED
				updateAll();
167
			}
168
		}
169
	}
170
171
	/**
172
	 * Validates and inserts a new client in the repository and notifies the view
173
	 * about the changes. This method delegates the inserting to the service layer.
174
	 * 
175
	 * @param firstName	the name of the client to add.
176
	 * @param lastName	the surname of the client to add.
177
	 */
178
	@Override
179
	public synchronized void addClient(String firstName, String lastName) {
180
		Client client = createClient(firstName, lastName);
181
		
182 1 1. addClient : removed conditional - replaced equality check with false → KILLED
		if (client != null) {
183
			try {
184
				Client clientInDB = bookingService.insertNewClient(client);
185 1 1. addClient : removed call to io/github/marcopaglio/booking/view/BookingView::clientAdded → KILLED
				view.clientAdded(clientInDB);
186
				LOGGER.info(() -> String.format("%s has been added with success.", clientInDB.toString()));
187
			} catch(InstanceAlreadyExistsException e) {
188
				LOGGER.warn(e.getMessage());
189 1 1. addClient : removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED
				view.showOperationError(instanceAlreadyExistsErrorMsg(
190
						getClientStringToDisplay(client.getFirstName(), client.getLastName())));
191 1 1. addClient : removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED
				updateAll();
192
			} catch(DatabaseException e) {
193
				LOGGER.warn(e.getMessage());
194 1 1. addClient : removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED
				view.showOperationError(databaseErrorMsg("adding "
195
						+ getClientStringToDisplay(client.getFirstName(), client.getLastName())));
196 1 1. addClient : removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED
				updateAll();
197
			}
198
		}
199
	}
200
201
	/**
202
	 * Manages the creation of a client object. If the creation goes wrong,
203
	 * the method notifies the view before returning a null object.
204
	 * 
205
	 * @param firstName	the name of the client to create.
206
	 * @param lastName	the surname of the client to create.
207
	 * @return			the {@code Client} created, if validation is successful;
208
	 * 					a {@code null} object, otherwise.
209
	 */
210
	private Client createClient(String firstName, String lastName) {
211
		try {
212 1 1. createClient : replaced return value with null for io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::createClient → KILLED
			return new Client(
213
					getValidatedFirstName(firstName),
214
					getValidatedLastName(lastName));
215
		} catch(IllegalArgumentException e) {
216 1 1. createClient : removed call to io/github/marcopaglio/booking/view/BookingView::showFormError → KILLED
			view.showFormError(e.getMessage());
217
			return null;
218
		}
219
	}
220
221
	/**
222
	 * Performs client name validation thought {@code clientValidator}.
223
	 * 
224
	 * @param firstName					the name to validate.
225
	 * @return							the validated name as {@code String}.
226
	 * @throws IllegalArgumentException	if validation fails.
227
	 */
228
	private String getValidatedFirstName(String firstName) throws IllegalArgumentException {
229
		try {
230 1 1. getValidatedFirstName : replaced return value with "" for io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::getValidatedFirstName → KILLED
			return clientValidator.validateFirstName(firstName);
231
		} catch(IllegalArgumentException e) {
232
			LOGGER.warn(e.getMessage());
233
			throw new IllegalArgumentException(illegalArgumentErrorMsg("Client's name", firstName));
234
		}
235
	}
236
237
	/**
238
	 * Performs client surname validation thought {@code clientValidator}.
239
	 * 
240
	 * @param lastName					the surname to validate.
241
	 * @return							the validated surname as {@code String}.
242
	 * @throws IllegalArgumentException	if validation fails.
243
	 */
244
	private String getValidatedLastName(String lastName) throws IllegalArgumentException {
245
		try {
246 1 1. getValidatedLastName : replaced return value with "" for io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::getValidatedLastName → KILLED
			return clientValidator.validateLastName(lastName);
247
		} catch(IllegalArgumentException e) {
248
			LOGGER.warn(e.getMessage());
249
			throw new IllegalArgumentException(illegalArgumentErrorMsg("Client's surname", lastName));
250
		}
251
	}
252
253
	/**
254
	 * Validates and inserts a new reservation in the repository and notifies the view
255
	 * about the changes. This method delegates the inserting to the service layer.
256
	 * 
257
	 * @param client	the associated client of the reservation to add.
258
	 * @param date		the date of the reservation to add.
259
	 */
260
	@Override
261
	public synchronized void addReservation(Client client, String date) {
262
		Reservation reservation = createReservation(client, date);
263
		
264 1 1. addReservation : removed conditional - replaced equality check with false → KILLED
		if (reservation != null) {
265
			try {
266
				Reservation reservationInDB = bookingService.insertNewReservation(reservation);
267 1 1. addReservation : removed call to io/github/marcopaglio/booking/view/BookingView::reservationAdded → KILLED
				view.reservationAdded(reservationInDB);
268
				LOGGER.info(() -> String.format("%s has been added with success.", reservationInDB.toString()));
269
			} catch(InstanceAlreadyExistsException e) {
270
				LOGGER.warn(e.getMessage());
271 1 1. addReservation : removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED
				view.showOperationError(instanceAlreadyExistsErrorMsg(
272
						getReservationStringToDisplay(reservation.getDate())));
273 1 1. addReservation : removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED
				updateAll();
274
			} catch(InstanceNotFoundException e) {
275
				LOGGER.warn(e.getMessage());
276 1 1. addReservation : removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED
				view.showOperationError(instanceNotFoundErrorMsg(
277
						getClientStringToDisplay(client.getFirstName(), client.getLastName())));
278 1 1. addReservation : removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED
				updateAll();
279
			} catch(DatabaseException e) {
280
				LOGGER.warn(e.getMessage());
281 1 1. addReservation : removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED
				view.showOperationError(databaseErrorMsg("adding "
282
						+ getReservationStringToDisplay(reservation.getDate())));
283 1 1. addReservation : removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED
				updateAll();
284
			}
285
		}
286
	}
287
288
	/**
289
	 * Manages the creation of a reservation object. If the creation goes wrong,
290
	 * the method notifies the view before throwing an exception.
291
	 * 
292
	 * @param client	the associated client of the reservation to create.
293
	 * @param date		the date of the reservation to create.
294
	 * @return			the {@code Reservation} created, if validation is successful;
295
	 * 					a {@code null} object, otherwise.
296
	 */
297
	private Reservation createReservation(Client client, String date) throws IllegalArgumentException {
298 1 1. createReservation : removed conditional - replaced equality check with false → KILLED
		if (client == null) {
299
			LOGGER.warn("Reservation's client to add cannot be null.");
300 1 1. createReservation : removed call to io/github/marcopaglio/booking/view/BookingView::showFormError → KILLED
			view.showFormError("Select a client to add the reservation to.");
301
			return null;
302
		}
303
		
304
		try {
305 1 1. createReservation : replaced return value with null for io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::createReservation → KILLED
			return new Reservation(
306
					getValidatedClientId(client.getId()),
307
					getValidatedDate(date));
308
		} catch(IllegalArgumentException e) {
309 1 1. createReservation : removed call to io/github/marcopaglio/booking/view/BookingView::showFormError → KILLED
			view.showFormError(e.getMessage());
310
			return null;
311
		}
312
	}
313
314
	/**
315
	 * Performs reservation client's identifier validation thought {@code reservationValidator}.
316
	 * 
317
	 * @param clientId					the client identifier to validate.
318
	 * @return							the validated client identifier as {@code UUID}.
319
	 * @throws IllegalArgumentException	if validation fails.
320
	 */
321
	private UUID getValidatedClientId(UUID clientId) throws IllegalArgumentException {
322
		try {
323 1 1. getValidatedClientId : replaced return value with null for io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::getValidatedClientId → KILLED
			return reservationValidator.validateClientId(clientId);
324
		} catch(IllegalArgumentException e) {
325
			LOGGER.warn(e.getMessage());
326
			throw new IllegalArgumentException(
327
					illegalArgumentErrorMsg("Reservation's client ID", String.valueOf(clientId)));
328
		}
329
	}
330
331
	/**
332
	 * Performs reservation date validation thought {@code reservationValidator}.
333
	 * 
334
	 * @param date						the date to validate.
335
	 * @return							the validated date as {@code LocalDate}.
336
	 * @throws IllegalArgumentException	if validation fails.
337
	 */
338
	private LocalDate getValidatedDate(String date) throws IllegalArgumentException {
339
		try {
340 1 1. getValidatedDate : replaced return value with null for io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::getValidatedDate → KILLED
			return reservationValidator.validateDate(date);
341
		} catch(IllegalArgumentException e) {
342
			LOGGER.warn(e.getMessage());
343
			throw new IllegalArgumentException(illegalArgumentErrorMsg("Reservation's date", date));
344
		}
345
	}
346
347
	/**
348
	 * Validates and modifies names of an existing client and notifies the view about the changes.
349
	 * This method delegates the renaming to the service layer only if new names are
350
	 * actually different from the old ones.
351
	 * 
352
	 * @param client		the client to modify.
353
	 * @param newFirstName	the new name for the client.
354
	 * @param newLastName	the new surname for the client.
355
	 */
356
	@Override
357
	public synchronized void renameClient(Client client, String newFirstName, String newLastName) {
358 1 1. renameClient : removed conditional - replaced equality check with false → KILLED
		if (client == null) {
359
			LOGGER.warn("Client to rename cannot be null.");
360 1 1. renameClient : removed call to io/github/marcopaglio/booking/view/BookingView::showFormError → KILLED
			view.showFormError("Select a client to rename.");
361
			return;
362
		}
363
		
364
		try {
365
			newFirstName = getValidatedFirstName(newFirstName);
366
			newLastName = getValidatedLastName(newLastName);
367
		} catch(IllegalArgumentException e) {
368 1 1. renameClient : removed call to io/github/marcopaglio/booking/view/BookingView::showFormError → KILLED
			view.showFormError(e.getMessage());
369
			return;
370
		}
371
		
372 1 1. renameClient : removed conditional - replaced equality check with false → KILLED
		if (Objects.equals(newFirstName, client.getFirstName())
373 1 1. renameClient : removed conditional - replaced equality check with false → KILLED
				&& Objects.equals(newLastName, client.getLastName())) {
374
			LOGGER.warn("The new names are the same as the old ones.");
375 1 1. renameClient : removed call to io/github/marcopaglio/booking/view/BookingView::showFormError → KILLED
			view.showFormError("Insert new names for the client to be renamed.");
376
			return;
377
		}
378
		
379
		try {
380
			Client clientInDB = bookingService.renameClient(
381
					client.getId(), newFirstName, newLastName);
382 1 1. renameClient : removed call to io/github/marcopaglio/booking/view/BookingView::clientRenamed → KILLED
			view.clientRenamed(client, clientInDB);
383
			LOGGER.info(() -> String.format("%s has been renamed with success.", clientInDB.toString()));
384
		} catch(InstanceAlreadyExistsException e) {
385
			LOGGER.warn(e.getMessage());
386 1 1. renameClient : removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED
			view.showOperationError(instanceAlreadyExistsErrorMsg(
387
					getClientStringToDisplay(newFirstName, newLastName)));
388 1 1. renameClient : removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED
			updateAll();
389
		} catch(InstanceNotFoundException e) {
390
			LOGGER.warn(e.getMessage());
391 1 1. renameClient : removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED
			view.showOperationError(instanceNotFoundErrorMsg(
392
					getClientStringToDisplay(client.getFirstName(), client.getLastName())));
393 1 1. renameClient : removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED
			updateAll();
394
		} catch(DatabaseException e) {
395
			LOGGER.warn(e.getMessage());
396 1 1. renameClient : removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED
			view.showOperationError(databaseErrorMsg("renaming "
397
					+ getClientStringToDisplay(client.getFirstName(), client.getLastName())));
398 1 1. renameClient : removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED
			updateAll();
399
		}
400
	}
401
402
	/**
403
	 * Modifies the date of an existing reservation and notifies the view about the changes.
404
	 * This method delegates the rescheduling to the service layer only if new date is
405
	 * actually different from the old one.
406
	 * 
407
	 * @param reservation	the reservation to modify.
408
	 * @param newDate		the new date for the reservation.
409
	 */
410
	@Override
411
	public synchronized void rescheduleReservation(Reservation reservation, String newDate) {
412 1 1. rescheduleReservation : removed conditional - replaced equality check with false → KILLED
		if (reservation == null) {
413
			LOGGER.warn("Reservation to reschedule cannot be null.");
414 1 1. rescheduleReservation : removed call to io/github/marcopaglio/booking/view/BookingView::showFormError → KILLED
			view.showFormError("Select a reservation to reschedule.");
415
			return;
416
		}
417
		
418
		LocalDate validatedDate;
419
		try {
420
			validatedDate = getValidatedDate(newDate);
421
		} catch(IllegalArgumentException e) {
422 1 1. rescheduleReservation : removed call to io/github/marcopaglio/booking/view/BookingView::showFormError → KILLED
			view.showFormError(e.getMessage());
423
			return;
424
		}
425
		
426 1 1. rescheduleReservation : removed conditional - replaced equality check with false → KILLED
		if (validatedDate == reservation.getDate()) {
427
			LOGGER.warn("The new date is the same as the old one.");
428 1 1. rescheduleReservation : removed call to io/github/marcopaglio/booking/view/BookingView::showFormError → KILLED
			view.showFormError("Insert a new date for the reservation to be rescheduled.");
429
			return;
430
		}
431
		
432
		try {
433
			Reservation reservationInDB = bookingService
434
					.rescheduleReservation(reservation.getId(), validatedDate);
435 1 1. rescheduleReservation : removed call to io/github/marcopaglio/booking/view/BookingView::reservationRescheduled → KILLED
			view.reservationRescheduled(reservation, reservationInDB);
436
			LOGGER.info(() -> String.format("%s has been rescheduled with success.", reservationInDB.toString()));
437
		} catch(InstanceAlreadyExistsException e) {
438
			LOGGER.warn(e.getMessage());
439 1 1. rescheduleReservation : removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED
			view.showOperationError(instanceAlreadyExistsErrorMsg(
440
					getReservationStringToDisplay(validatedDate)));
441 1 1. rescheduleReservation : removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED
			updateAll();
442
		} catch(InstanceNotFoundException e) {
443
			LOGGER.warn(e.getMessage());
444 1 1. rescheduleReservation : removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED
			view.showOperationError(instanceNotFoundErrorMsg(
445
					getReservationStringToDisplay(reservation.getDate())));
446 1 1. rescheduleReservation : removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED
			updateAll();
447
		} catch(DatabaseException e) {
448
			LOGGER.warn(e.getMessage());
449 1 1. rescheduleReservation : removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED
			view.showOperationError(databaseErrorMsg("rescheduling "
450
					+ getReservationStringToDisplay(reservation.getDate())));
451 1 1. rescheduleReservation : removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED
			updateAll();
452
		}
453
	}
454
455
	/**
456
	 * Generates an error message used when a {@code InstanceAlreadyExistsException} occurs.
457
	 * 
458
	 * @param alreadyExistingInstance	the description of the existing instance.
459
	 * @return							a {@code String} containing the generated error message.
460
	 */
461
	private String instanceAlreadyExistsErrorMsg(String alreadyExistingInstance) {
462 1 1. instanceAlreadyExistsErrorMsg : replaced return value with "" for io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::instanceAlreadyExistsErrorMsg → KILLED
		return alreadyExistingInstance + " already exists.";
463
	}
464
465
	/**
466
	 * Generates an error message used when a {@code InstanceNotFoundException} occurs.
467
	 * 
468
	 * @param notFoundInstance	the description of the not found instance.
469
	 * @return					a {@code String} containing the generated error message.
470
	 */
471
	private String instanceNotFoundErrorMsg(String notFoundInstance) {
472 1 1. instanceNotFoundErrorMsg : replaced return value with "" for io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::instanceNotFoundErrorMsg → KILLED
		return notFoundInstance + " no longer exists.";
473
	}
474
475
	/**
476
	 * Generates an error message used when a {@code DatabaseException} occurs.
477
	 * 
478
	 * @param failedAction	description of the failed actions.
479
	 * @return				a {@code String} containing the generated error message.
480
	 */
481
	private String databaseErrorMsg(String failedAction) {
482 1 1. databaseErrorMsg : replaced return value with "" for io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::databaseErrorMsg → KILLED
		return "Something went wrong while " + failedAction + ".";
483
	}
484
485
	/**
486
	 * Generates an error message used when an {@code IllegalArgumentException} occurs.
487
	 * 
488
	 * @param argName	description of the illegal argument.
489
	 * @param argValue	value of the illegal argument.
490
	 * @return			a {@code String} containing the generated error message.
491
	 */
492
	private String illegalArgumentErrorMsg(String argName, String argValue) {
493 1 1. illegalArgumentErrorMsg : replaced return value with "" for io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::illegalArgumentErrorMsg → KILLED
		return argName + " [" + argValue + "] is not valid.";
494
	}
495
496
	/**
497
	 * Generates a string descriptor of a generic {@code Client} with the specified name and surname.
498
	 * 
499
	 * @param firstName	the name of the generic client.
500
	 * @param lastName	the surname of the generic client.
501
	 * @return			a {@code String} descriptor of the generic client.
502
	 */
503
	private String getClientStringToDisplay(String firstName, String lastName) {
504 1 1. getClientStringToDisplay : replaced return value with "" for io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::getClientStringToDisplay → KILLED
		return "Client named " + firstName + " " + lastName;
505
	}
506
507
	/**
508
	 * Generates a string descriptor of a generic {@code Reservation} with the specified date.
509
	 * 
510
	 * @param date	the date of the generic reservation.
511
	 * @return		a {@code String} descriptor of the generic reservation.
512
	 */
513
	private String getReservationStringToDisplay(LocalDate date) {
514 1 1. getReservationStringToDisplay : replaced return value with "" for io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::getReservationStringToDisplay → KILLED
		return "Reservation on " + date;
515
	}
516
}

Mutations

74

1.1
Location : allClients
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AllClientsTest]/[method:testAllClientsWhenThereAreNoClientsInRepositoryShouldCallViewWithEmptyList()]
removed call to io/github/marcopaglio/booking/view/BookingView::showAllClients → KILLED

78

1.1
Location : allClients
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AllClientsTest]/[method:testAllClientsWhenDatabaseRequestFailsShouldShowErrorAndNotThrow()]
removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED

89

1.1
Location : allReservations
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AllReservationsTest]/[method:testAllReservationsWhenThereAreNoReservationsInRepositoryShouldCallViewWithEmptyList()]
removed call to io/github/marcopaglio/booking/view/BookingView::showAllReservations → KILLED

93

1.1
Location : allReservations
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AllReservationsTest]/[method:testAllReservationsWhenDatabaseRequestFailsShouldShowErrorAndNotThrow()]
removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED

102

1.1
Location : updateAll
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:DeleteReservationTest]/[method:testDeleteReservationWhenDatabaseRequestFailsShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::allReservations → KILLED

103

1.1
Location : updateAll
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:DeleteReservationTest]/[method:testDeleteReservationWhenDatabaseRequestFailsShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::allClients → KILLED

115

1.1
Location : deleteClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:DeleteClientTest]/[method:testDeleteClientWhenClientIsNullShouldShowError()]
removed conditional - replaced equality check with false → KILLED

117

1.1
Location : deleteClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:DeleteClientTest]/[method:testDeleteClientWhenClientIsNullShouldShowError()]
removed call to io/github/marcopaglio/booking/view/BookingView::showFormError → KILLED

122

1.1
Location : deleteClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:DeleteClientTest]/[method:testDeleteClientWhenClientIsInRepositoryShouldDelegateToServiceAndNotifyView()]
removed call to io/github/marcopaglio/booking/service/BookingService::removeClientNamed → KILLED

123

1.1
Location : deleteClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:DeleteClientTest]/[method:testDeleteClientWhenClientIsInRepositoryShouldDelegateToServiceAndNotifyView()]
removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::allReservations → KILLED

124

1.1
Location : deleteClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:DeleteClientTest]/[method:testDeleteClientWhenClientIsInRepositoryShouldDelegateToServiceAndNotifyView()]
removed call to io/github/marcopaglio/booking/view/BookingView::clientRemoved → KILLED

128

1.1
Location : deleteClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:DeleteClientTest]/[method:testDeleteClientWhenClientIsNotInRepositoryShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED

130

1.1
Location : deleteClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:DeleteClientTest]/[method:testDeleteClientWhenClientIsNotInRepositoryShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED

133

1.1
Location : deleteClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:DeleteClientTest]/[method:testDeleteClientWhenDatabaseRequestFailsShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED

135

1.1
Location : deleteClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:DeleteClientTest]/[method:testDeleteClientWhenDatabaseRequestFailsShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED

148

1.1
Location : deleteReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:DeleteReservationTest]/[method:testDeleteReservationWhenReservationIsNullShouldShowError()]
removed conditional - replaced equality check with false → KILLED

150

1.1
Location : deleteReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:DeleteReservationTest]/[method:testDeleteReservationWhenReservationIsNullShouldShowError()]
removed call to io/github/marcopaglio/booking/view/BookingView::showFormError → KILLED

154

1.1
Location : deleteReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:DeleteReservationTest]/[method:testDeleteReservationWhenReservationIsInRepositoryShouldDelegateToServiceAndNotifyView()]
removed call to io/github/marcopaglio/booking/service/BookingService::removeReservationOn → KILLED

155

1.1
Location : deleteReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:DeleteReservationTest]/[method:testDeleteReservationWhenReservationIsInRepositoryShouldDelegateToServiceAndNotifyView()]
removed call to io/github/marcopaglio/booking/view/BookingView::reservationRemoved → KILLED

159

1.1
Location : deleteReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:DeleteReservationTest]/[method:testDeleteReservationWhenReservationIsNotInRepositoryShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED

161

1.1
Location : deleteReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:DeleteReservationTest]/[method:testDeleteReservationWhenReservationIsNotInRepositoryShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED

164

1.1
Location : deleteReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:DeleteReservationTest]/[method:testDeleteReservationWhenDatabaseRequestFailsShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED

166

1.1
Location : deleteReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:DeleteReservationTest]/[method:testDeleteReservationWhenDatabaseRequestFailsShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED

182

1.1
Location : addClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AddClientTest]/[nested-class:ValidationSuccessfulTest]/[method:testAddClientWhenClientIsNewShouldValidateItAndDelegateToServiceAndNotifyView()]
removed conditional - replaced equality check with false → KILLED

185

1.1
Location : addClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AddClientTest]/[nested-class:ValidationSuccessfulTest]/[method:testAddClientWhenClientIsNewShouldValidateItAndDelegateToServiceAndNotifyView()]
removed call to io/github/marcopaglio/booking/view/BookingView::clientAdded → KILLED

189

1.1
Location : addClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AddClientTest]/[nested-class:ValidationSuccessfulTest]/[method:testAddClientWhenClientIsNotNewShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED

191

1.1
Location : addClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AddClientTest]/[nested-class:ValidationSuccessfulTest]/[method:testAddClientWhenClientIsNotNewShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED

194

1.1
Location : addClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AddClientTest]/[nested-class:ValidationSuccessfulTest]/[method:testAddClientWhenDatabaseRequestFailsShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED

196

1.1
Location : addClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AddClientTest]/[nested-class:ValidationSuccessfulTest]/[method:testAddClientWhenDatabaseRequestFailsShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED

212

1.1
Location : createClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AddClientTest]/[nested-class:ValidationSuccessfulTest]/[method:testAddClientWhenClientIsNewShouldValidateItAndDelegateToServiceAndNotifyView()]
replaced return value with null for io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::createClient → KILLED

216

1.1
Location : createClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AddClientTest]/[nested-class:ValidationFailureTest]/[method:testAddClientWhenNameIsNotValidShouldShowErrorAndNotInsert()]
removed call to io/github/marcopaglio/booking/view/BookingView::showFormError → KILLED

230

1.1
Location : getValidatedFirstName
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AddClientTest]/[nested-class:ValidationSuccessfulTest]/[method:testAddClientWhenClientIsNewShouldValidateItAndDelegateToServiceAndNotifyView()]
replaced return value with "" for io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::getValidatedFirstName → KILLED

246

1.1
Location : getValidatedLastName
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AddClientTest]/[nested-class:ValidationSuccessfulTest]/[method:testAddClientWhenClientIsNewShouldValidateItAndDelegateToServiceAndNotifyView()]
replaced return value with "" for io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::getValidatedLastName → KILLED

264

1.1
Location : addReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AddReservationTest]/[nested-class:ValidationSuccessfulTest]/[method:testAddReservationWhenReservationIsNewShouldValidateItAndDelegateToServiceAndNotifyView()]
removed conditional - replaced equality check with false → KILLED

267

1.1
Location : addReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AddReservationTest]/[nested-class:ValidationSuccessfulTest]/[method:testAddReservationWhenReservationIsNewShouldValidateItAndDelegateToServiceAndNotifyView()]
removed call to io/github/marcopaglio/booking/view/BookingView::reservationAdded → KILLED

271

1.1
Location : addReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AddReservationTest]/[nested-class:ValidationSuccessfulTest]/[method:testAddReservationWhenReservationIsNotNewShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED

273

1.1
Location : addReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AddReservationTest]/[nested-class:ValidationSuccessfulTest]/[method:testAddReservationWhenReservationIsNotNewShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED

276

1.1
Location : addReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AddReservationTest]/[nested-class:ValidationSuccessfulTest]/[method:testAddReservationWhenAssociatedClientIsNotInDatabaseShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED

278

1.1
Location : addReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AddReservationTest]/[nested-class:ValidationSuccessfulTest]/[method:testAddReservationWhenAssociatedClientIsNotInDatabaseShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED

281

1.1
Location : addReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AddReservationTest]/[nested-class:ValidationSuccessfulTest]/[method:testAddReservationWhenDatabaseRequestFailsShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED

283

1.1
Location : addReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AddReservationTest]/[nested-class:ValidationSuccessfulTest]/[method:testAddReservationWhenDatabaseRequestFailsShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED

298

1.1
Location : createReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AddReservationTest]/[method:testAddReservationWhenClientIsNullShouldShowError()]
removed conditional - replaced equality check with false → KILLED

300

1.1
Location : createReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AddReservationTest]/[method:testAddReservationWhenClientIsNullShouldShowError()]
removed call to io/github/marcopaglio/booking/view/BookingView::showFormError → KILLED

305

1.1
Location : createReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AddReservationTest]/[nested-class:ValidationSuccessfulTest]/[method:testAddReservationWhenReservationIsNewShouldValidateItAndDelegateToServiceAndNotifyView()]
replaced return value with null for io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::createReservation → KILLED

309

1.1
Location : createReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AddReservationTest]/[nested-class:ValidationFailureTest]/[method:testAddReservationWhenDateIsNotValidShouldShowErrorAndNotInsert()]
removed call to io/github/marcopaglio/booking/view/BookingView::showFormError → KILLED

323

1.1
Location : getValidatedClientId
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AddReservationTest]/[nested-class:ValidationSuccessfulTest]/[method:testAddReservationWhenReservationIsNewShouldValidateItAndDelegateToServiceAndNotifyView()]
replaced return value with null for io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::getValidatedClientId → KILLED

340

1.1
Location : getValidatedDate
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:RescheduleReservationTest]/[nested-class:ValidationSuccessfulTest]/[method:testRescheduleReservationWhenValidatedDateHasNotChangedShouldShowErrorAndNotReschedule()]
replaced return value with null for io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::getValidatedDate → KILLED

358

1.1
Location : renameClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:RenameClientTest]/[method:testRenameClientWhenClientIsNullShouldShowError()]
removed conditional - replaced equality check with false → KILLED

360

1.1
Location : renameClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:RenameClientTest]/[method:testRenameClientWhenClientIsNullShouldShowError()]
removed call to io/github/marcopaglio/booking/view/BookingView::showFormError → KILLED

368

1.1
Location : renameClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:RenameClientTest]/[nested-class:ValidationFailureTest]/[method:testRenameClientWhenNewNameIsNotValidShouldShowErrorAndNotRename()]
removed call to io/github/marcopaglio/booking/view/BookingView::showFormError → KILLED

372

1.1
Location : renameClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:RenameClientTest]/[nested-class:ValidationSuccessfulTest]/[method:testRenameClientWhenBothValidatedNamesHaveNotChangedShouldShowErrorAndNotRename()]
removed conditional - replaced equality check with false → KILLED

373

1.1
Location : renameClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:RenameClientTest]/[nested-class:ValidationSuccessfulTest]/[method:testRenameClientWhenBothValidatedNamesHaveNotChangedShouldShowErrorAndNotRename()]
removed conditional - replaced equality check with false → KILLED

375

1.1
Location : renameClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:RenameClientTest]/[nested-class:ValidationSuccessfulTest]/[method:testRenameClientWhenBothValidatedNamesHaveNotChangedShouldShowErrorAndNotRename()]
removed call to io/github/marcopaglio/booking/view/BookingView::showFormError → KILLED

382

1.1
Location : renameClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:RenameClientTest]/[nested-class:ValidationSuccessfulTest]/[method:testRenameClientWhenValidatedNameHasNotChangedShouldRename()]
removed call to io/github/marcopaglio/booking/view/BookingView::clientRenamed → KILLED

386

1.1
Location : renameClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:RenameClientTest]/[nested-class:ValidationSuccessfulTest]/[method:testRenameClientWhenRenamedClientIsNotNewShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED

388

1.1
Location : renameClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:RenameClientTest]/[nested-class:ValidationSuccessfulTest]/[method:testRenameClientWhenRenamedClientIsNotNewShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED

391

1.1
Location : renameClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:RenameClientTest]/[nested-class:ValidationSuccessfulTest]/[method:testRenameClientWhenClientIsNotInDatabaseShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED

393

1.1
Location : renameClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:RenameClientTest]/[nested-class:ValidationSuccessfulTest]/[method:testRenameClientWhenClientIsNotInDatabaseShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED

396

1.1
Location : renameClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:RenameClientTest]/[nested-class:ValidationSuccessfulTest]/[method:testRenameClientWhenDatabaseRequestFailsShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED

398

1.1
Location : renameClient
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:RenameClientTest]/[nested-class:ValidationSuccessfulTest]/[method:testRenameClientWhenDatabaseRequestFailsShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED

412

1.1
Location : rescheduleReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:RescheduleReservationTest]/[method:testRescheduleReservationWhenReservationIsNullShouldShowError()]
removed conditional - replaced equality check with false → KILLED

414

1.1
Location : rescheduleReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:RescheduleReservationTest]/[method:testRescheduleReservationWhenReservationIsNullShouldShowError()]
removed call to io/github/marcopaglio/booking/view/BookingView::showFormError → KILLED

422

1.1
Location : rescheduleReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:RescheduleReservationTest]/[method:testRescheduleReservationWhenNewDateIsNotValidShouldShowErrorAndNotReschedule()]
removed call to io/github/marcopaglio/booking/view/BookingView::showFormError → KILLED

426

1.1
Location : rescheduleReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:RescheduleReservationTest]/[nested-class:ValidationSuccessfulTest]/[method:testRescheduleReservationWhenValidatedDateHasNotChangedShouldShowErrorAndNotReschedule()]
removed conditional - replaced equality check with false → KILLED

428

1.1
Location : rescheduleReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:RescheduleReservationTest]/[nested-class:ValidationSuccessfulTest]/[method:testRescheduleReservationWhenValidatedDateHasNotChangedShouldShowErrorAndNotReschedule()]
removed call to io/github/marcopaglio/booking/view/BookingView::showFormError → KILLED

435

1.1
Location : rescheduleReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:RescheduleReservationTest]/[nested-class:ValidationSuccessfulTest]/[method:testRescheduleReservationWhenRescheduledReservationIsNewShouldValidateItAndDelegateToServiceAndNotifyView()]
removed call to io/github/marcopaglio/booking/view/BookingView::reservationRescheduled → KILLED

439

1.1
Location : rescheduleReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:RescheduleReservationTest]/[nested-class:ValidationSuccessfulTest]/[method:testRescheduleReservationWhenRescheduledReservationIsNotNewShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED

441

1.1
Location : rescheduleReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:RescheduleReservationTest]/[nested-class:ValidationSuccessfulTest]/[method:testRescheduleReservationWhenRescheduledReservationIsNotNewShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED

444

1.1
Location : rescheduleReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:RescheduleReservationTest]/[nested-class:ValidationSuccessfulTest]/[method:testRescheduleReservationWhenReservationIsNotInDatabaseShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED

446

1.1
Location : rescheduleReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:RescheduleReservationTest]/[nested-class:ValidationSuccessfulTest]/[method:testRescheduleReservationWhenReservationIsNotInDatabaseShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED

449

1.1
Location : rescheduleReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:RescheduleReservationTest]/[nested-class:ValidationSuccessfulTest]/[method:testRescheduleReservationWhenDatabaseRequestFailsShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/view/BookingView::showOperationError → KILLED

451

1.1
Location : rescheduleReservation
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:RescheduleReservationTest]/[nested-class:ValidationSuccessfulTest]/[method:testRescheduleReservationWhenDatabaseRequestFailsShouldShowErrorAndUpdateView()]
removed call to io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::updateAll → KILLED

462

1.1
Location : instanceAlreadyExistsErrorMsg
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AddClientTest]/[nested-class:ValidationSuccessfulTest]/[method:testAddClientWhenClientIsNotNewShouldShowErrorAndUpdateView()]
replaced return value with "" for io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::instanceAlreadyExistsErrorMsg → KILLED

472

1.1
Location : instanceNotFoundErrorMsg
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:DeleteClientTest]/[method:testDeleteClientWhenClientIsNotInRepositoryShouldShowErrorAndUpdateView()]
replaced return value with "" for io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::instanceNotFoundErrorMsg → KILLED

482

1.1
Location : databaseErrorMsg
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AllClientsTest]/[method:testAllClientsWhenDatabaseRequestFailsShouldShowErrorAndNotThrow()]
replaced return value with "" for io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::databaseErrorMsg → KILLED

493

1.1
Location : illegalArgumentErrorMsg
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:AddClientTest]/[nested-class:ValidationFailureTest]/[method:testAddClientWhenNameIsNotValidShouldShowErrorAndNotInsert()]
replaced return value with "" for io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::illegalArgumentErrorMsg → KILLED

504

1.1
Location : getClientStringToDisplay
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:DeleteClientTest]/[method:testDeleteClientWhenClientIsNotInRepositoryShouldShowErrorAndUpdateView()]
replaced return value with "" for io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::getClientStringToDisplay → KILLED

514

1.1
Location : getReservationStringToDisplay
Killed by : io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest.[engine:junit-jupiter]/[class:io.github.marcopaglio.booking.presenter.served.ServedBookingPresenterTest]/[nested-class:DeleteReservationTest]/[method:testDeleteReservationWhenDatabaseRequestFailsShouldShowErrorAndUpdateView()]
replaced return value with "" for io/github/marcopaglio/booking/presenter/served/ServedBookingPresenter::getReservationStringToDisplay → KILLED

Active mutators

Tests examined


Report generated by PIT 1.15.6