This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to annotated tag org.apache.sling.testing.osgi-mock-1.4.0 in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-osgi-mock.git
commit 7da1c22e78fcd2ec95e33283e0ed9463a16a4be9 Author: Robert Munteanu <[email protected]> AuthorDate: Tue Jun 9 15:29:56 2015 +0000 MockBundleTest - cast once in the @BeforeMethod instead of every test git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/osgi-mock@1684447 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/sling/testing/mock/osgi/MockBundleTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/java/org/apache/sling/testing/mock/osgi/MockBundleTest.java b/src/test/java/org/apache/sling/testing/mock/osgi/MockBundleTest.java index ccce6ad..929f9da 100644 --- a/src/test/java/org/apache/sling/testing/mock/osgi/MockBundleTest.java +++ b/src/test/java/org/apache/sling/testing/mock/osgi/MockBundleTest.java @@ -31,11 +31,11 @@ import com.google.common.collect.ImmutableMap; public class MockBundleTest { - private Bundle bundle; + private MockBundle bundle; @Before public void setUp() { - bundle = MockOsgi.newBundleContext().getBundle(); + bundle = (MockBundle) MockOsgi.newBundleContext().getBundle(); } @Test @@ -61,14 +61,14 @@ public class MockBundleTest { @Test public void testGetHeaders() { - ((MockBundle)bundle).setHeaders(ImmutableMap.of("prop1", "value1")); + bundle.setHeaders(ImmutableMap.of("prop1", "value1")); assertEquals("value1", bundle.getHeaders().get("prop1")); assertEquals("value1", bundle.getHeaders("en").get("prop1")); } @Test public void testGetSymbolicName() throws Exception { - ((MockBundle)bundle).setSymbolicName("name-1"); + bundle.setSymbolicName("name-1"); assertEquals("name-1", bundle.getSymbolicName()); } -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
