This is an automated email from the ASF dual-hosted git repository. richard pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/brooklyn-server.git
The following commit(s) were added to refs/heads/master by this push: new 5a89849 Allows BrooklynProperties to be passed to TestApplication constructor new f53cca7 Merge pull request #1151 from nakomis/test-application 5a89849 is described below commit 5a89849d3cd731d2085433f12e677adf263a99e8 Author: Martin Harris <martin.har...@cloudsoftcorp.com> AuthorDate: Fri Feb 26 12:05:26 2021 +0000 Allows BrooklynProperties to be passed to TestApplication constructor --- .../java/org/apache/brooklyn/core/test/entity/TestApplication.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/test/java/org/apache/brooklyn/core/test/entity/TestApplication.java b/core/src/test/java/org/apache/brooklyn/core/test/entity/TestApplication.java index b5269bb..adc1f83 100644 --- a/core/src/test/java/org/apache/brooklyn/core/test/entity/TestApplication.java +++ b/core/src/test/java/org/apache/brooklyn/core/test/entity/TestApplication.java @@ -28,6 +28,7 @@ import org.apache.brooklyn.api.mgmt.ManagementContext; import org.apache.brooklyn.api.sensor.AttributeSensor; import org.apache.brooklyn.core.entity.EntityInternal; import org.apache.brooklyn.core.entity.StartableApplication; +import org.apache.brooklyn.core.internal.BrooklynProperties; import org.apache.brooklyn.core.location.SimulatedLocation; import org.apache.brooklyn.core.sensor.Sensors; import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation; @@ -58,6 +59,9 @@ public interface TestApplication extends StartableApplication, EntityInternal { public static TestApplication newManagedInstanceForTests(ManagementContext mgmt) { return mgmt.getEntityManager().createEntity(EntitySpec.create(TestApplication.class)); } + public static TestApplication newManagedInstanceForTests(BrooklynProperties properties) { + return newManagedInstanceForTests(new LocalManagementContextForTests(properties)); + } public static TestApplication newManagedInstanceForTests() { return newManagedInstanceForTests(new LocalManagementContextForTests()); }