Search in sources :

Example 1 with HashingInstanceUrlIdGenerator

use of de.codecentric.boot.admin.server.services.HashingInstanceUrlIdGenerator in project spring-boot-admin by codecentric.

the class InstanceDiscoveryListenerTest method setup.

@BeforeEach
public void setup() {
    this.discovery = mock(DiscoveryClient.class);
    InstanceRepository repository = new EventsourcingInstanceRepository(new InMemoryEventStore());
    this.registry = spy(new InstanceRegistry(repository, new HashingInstanceUrlIdGenerator()));
    this.listener = new InstanceDiscoveryListener(this.discovery, this.registry, repository);
}
Also used : InstanceRegistry(de.codecentric.boot.admin.server.services.InstanceRegistry) HashingInstanceUrlIdGenerator(de.codecentric.boot.admin.server.services.HashingInstanceUrlIdGenerator) InMemoryEventStore(de.codecentric.boot.admin.server.eventstore.InMemoryEventStore) EventsourcingInstanceRepository(de.codecentric.boot.admin.server.domain.entities.EventsourcingInstanceRepository) DiscoveryClient(org.springframework.cloud.client.discovery.DiscoveryClient) EventsourcingInstanceRepository(de.codecentric.boot.admin.server.domain.entities.EventsourcingInstanceRepository) InstanceRepository(de.codecentric.boot.admin.server.domain.entities.InstanceRepository) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

EventsourcingInstanceRepository (de.codecentric.boot.admin.server.domain.entities.EventsourcingInstanceRepository)1 InstanceRepository (de.codecentric.boot.admin.server.domain.entities.InstanceRepository)1 InMemoryEventStore (de.codecentric.boot.admin.server.eventstore.InMemoryEventStore)1 HashingInstanceUrlIdGenerator (de.codecentric.boot.admin.server.services.HashingInstanceUrlIdGenerator)1 InstanceRegistry (de.codecentric.boot.admin.server.services.InstanceRegistry)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1 DiscoveryClient (org.springframework.cloud.client.discovery.DiscoveryClient)1