/** * Remove some data from the context. * @param key the key to remove * @return the removed object when it exists */ public <T> T remove(String key) { T ret = (T) delegate.remove(key); return ret; }
/** * Remove some data from the context. * @param key the key to remove * @return the removed object when it exists */ public <T> T remove(String key) { T ret = (T) delegate.remove(key); return ret; }
public static <T>java.lang.Object remove(io.vertx.ext.unit.TestContext j_receiver, java.lang.String key) { return io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.remove(key)); } public static io.vertx.ext.unit.TestContext assertNull(io.vertx.ext.unit.TestContext j_receiver, java.lang.Object expected) {
@Test public void testAttributesOperations() throws Exception { TestSuite suite = TestSuite.create("my_suite").test("my_test", context -> { context.assertEquals(null, context.get("value")); context.assertEquals(null, context.put("value", 4)); context.assertEquals(4, context.get("value")); context.assertEquals(4, context.put("value", 5)); context.assertEquals(5, context.get("value")); context.assertEquals(5, context.remove("value")); context.assertEquals(null, context.get("value")); }); TestReporter reporter = new TestReporter(); run(suite, reporter); reporter.await(); assertEquals(0, reporter.exceptions.size()); assertEquals(1, reporter.results.size()); assertEquals("my_test", reporter.results.get(0).name()); assertFalse(reporter.results.get(0).failed()); }
context.remove(Settings.SETTINGS_LOCATION_PROPERTY); context.assertNotNull(vertx); FileSystem fs = vertx.fileSystem();