use of de.codecentric.boot.admin.server.domain.entities.InstanceRepository in project spring-boot-admin by codecentric.
the class LetsChatNotifierTest method setUp.
@BeforeEach
public void setUp() {
InstanceRepository repository = mock(InstanceRepository.class);
when(repository.find(instance.getId())).thenReturn(Mono.just(instance));
restTemplate = mock(RestTemplate.class);
notifier = new LetsChatNotifier(repository, restTemplate);
notifier.setUsername(user);
notifier.setUrl(URI.create(host));
notifier.setRoom(room);
notifier.setToken(token);
}
use of de.codecentric.boot.admin.server.domain.entities.InstanceRepository 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);
}
Aggregations