You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2018/01/22 16:59:40 UTC
[isis] branch ISIS-1846_internal_utils updated: ISIS-1845 fix
EventBusServiceDefaultTest NPE
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch ISIS-1846_internal_utils
in repository https://gitbox.apache.org/repos/asf/isis.git
The following commit(s) were added to refs/heads/ISIS-1846_internal_utils by this push:
new 7ba8fd6 ISIS-1845 fix EventBusServiceDefaultTest NPE
7ba8fd6 is described below
commit 7ba8fd644d7a85a9a86a4406363871b62fa6cda6
Author: Andi Huber <ah...@apache.org>
AuthorDate: Mon Jan 22 17:59:39 2018 +0100
ISIS-1845 fix EventBusServiceDefaultTest NPE
---
.../eventbus/EventBusServiceDefaultTest.java | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/core/runtime/src/test/java/org/apache/isis/core/runtime/services/eventbus/EventBusServiceDefaultTest.java b/core/runtime/src/test/java/org/apache/isis/core/runtime/services/eventbus/EventBusServiceDefaultTest.java
index 1943f86..c919cf1 100644
--- a/core/runtime/src/test/java/org/apache/isis/core/runtime/services/eventbus/EventBusServiceDefaultTest.java
+++ b/core/runtime/src/test/java/org/apache/isis/core/runtime/services/eventbus/EventBusServiceDefaultTest.java
@@ -16,19 +16,21 @@
*/
package org.apache.isis.core.runtime.services.eventbus;
-import java.util.Collections;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.nullValue;
+import static org.junit.Assert.assertThat;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.eventbus.Subscribe;
+import java.util.Collections;
+import java.util.List;
+import org.apache.isis.applib.services.registry.ServiceRegistry;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.Matchers.nullValue;
-import static org.junit.Assert.assertThat;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.eventbus.Subscribe;
public class EventBusServiceDefaultTest {
@@ -37,6 +39,14 @@ public class EventBusServiceDefaultTest {
@Before
public void setUp() throws Exception {
eventBusService = new EventBusServiceDefault() {
+ {
+ serviceRegistry = new ServiceRegistry() {
+ @Override public <T> Iterable<T> lookupServices(Class<T> service) { return null; }
+ @Override public <T> T lookupService(Class<T> service) { return null; }
+ @Override public <T> T injectServicesInto(T domainObject) { return null; }
+ @Override public List<Object> getRegisteredServices() { return null; }
+ };
+ }
};
}
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.