CommonDomainRegistry.java

1
package com.reallifedeveloper.common.domain.registry;
2
3
import com.reallifedeveloper.common.domain.TimeService;
4
import com.reallifedeveloper.common.domain.event.DomainEventPublisher;
5
6
/**
7
 * A registry of common domain components that need to be available in code where it is not
8
 * practical to use dependency injection.
9
 *
10
 * @author RealLifeDeveloper
11
 */
12
public class CommonDomainRegistry extends AbstractDomainRegistry {
13
14
    /**
15
     * Gives the {@link DomainEventPublisher} to use to publish domain events.
16
     *
17
     * @return the {@code DomainEventPublisher}
18
     */
19
    public static DomainEventPublisher domainEventPublisher() {
20 1 1. domainEventPublisher : replaced return value with null for com/reallifedeveloper/common/domain/registry/CommonDomainRegistry::domainEventPublisher → SURVIVED
        return getBean(DomainEventPublisher.class);
21
    }
22
23
    /**
24
     * Gives the {@link TimeService} to use to work with "current" time.
25
     *
26
     * @return the {@code TimeService}
27
     */
28
    public static TimeService timeService() {
29 1 1. timeService : replaced return value with null for com/reallifedeveloper/common/domain/registry/CommonDomainRegistry::timeService → KILLED
        return getBean(TimeService.class);
30
    }
31
}

Mutations

20

1.1
Location : domainEventPublisher
Killed by : none
replaced return value with null for com/reallifedeveloper/common/domain/registry/CommonDomainRegistry::domainEventPublisher → SURVIVED
Covering tests

29

1.1
Location : timeService
Killed by : com.reallifedeveloper.common.domain.event.DomainEventTest.[engine:junit-jupiter]/[class:com.reallifedeveloper.common.domain.event.DomainEventTest]/[method:constructorNullDateVersion()]
replaced return value with null for com/reallifedeveloper/common/domain/registry/CommonDomainRegistry::timeService → KILLED

Active mutators

Tests examined


Report generated by PIT 1.20.0