diff --git a/cory-core/src/test/java/moe/rafal/cory/integration/FieldInjectionException.java b/cory-core/src/test/java/moe/rafal/cory/integration/FieldInjectionException.java new file mode 100644 index 0000000..075af03 --- /dev/null +++ b/cory-core/src/test/java/moe/rafal/cory/integration/FieldInjectionException.java @@ -0,0 +1,25 @@ +/* + * Copyright 2023 cory + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package moe.rafal.cory.integration; + +public class FieldInjectionException extends IllegalStateException { + + public FieldInjectionException(String message, Throwable throwable) { + super(message, throwable); + } +} diff --git a/cory-core/src/test/java/moe/rafal/cory/integration/nats/EmbeddedNatsServerExtension.java b/cory-core/src/test/java/moe/rafal/cory/integration/nats/EmbeddedNatsServerExtension.java index e2647e7..39e712d 100644 --- a/cory-core/src/test/java/moe/rafal/cory/integration/nats/EmbeddedNatsServerExtension.java +++ b/cory-core/src/test/java/moe/rafal/cory/integration/nats/EmbeddedNatsServerExtension.java @@ -22,6 +22,7 @@ import java.lang.reflect.Field; import java.util.function.Predicate; +import moe.rafal.cory.integration.FieldInjectionException; import np.com.madanpokharel.embed.nats.EmbeddedNatsConfig; import np.com.madanpokharel.embed.nats.EmbeddedNatsServer; import org.junit.jupiter.api.extension.AfterAllCallback; @@ -82,8 +83,12 @@ private void injectFields(Class testClass, Object testInstance, Predicate testClass, Object testInstance, Predicate