@Test public final void testAssertNotNull() { Integer i = testee.assertNotNull(new Integer(1), "i"); Assert.assertEquals(new Integer(1), i); try { i = testee.assertNotNull(null, "i"); Assert.fail("Must fail for null argument"); } catch (RuntimeException e) { Assert.assertEquals("Argument [i] cannot be null", e.getMessage()); } }
public <T> T assertNotNull(T o, String argument) { if (o == null) { throwException(DBMessages.ASSERT_NOT_NULL, argument); } return o; }
LocalizedAssert { public <T> T assertNotNull(T o, String argument) { if (o == null) { throwException(DBMessages.ASSERT_NOT_NULL, argument); } return o; } }
LocalizedAssert { public <T> T assertNotNull(T o, String argument) { if (o == null) { throwException(DBMessages.ASSERT_NOT_NULL, argument); } return o; } LocalizedAssert(final ConnectorMessages cm);  LocalizedAssert(final ConnectorMessages cm, boolean localizeArguments); }
LocalizedAssert { public <T> T assertNotNull(T o, String argument) { if (o == null) { throwException(DBMessages.ASSERT_NOT_NULL, argument); } return o; } LocalizedAssert(final ConnectorMessages cm);  LocalizedAssert(final ConnectorMessages cm, boolean localizeArguments); T assertNotNull(T o, String argument); T assertNull(T o, String argument); String assertNotBlank(String o, String argument); String assertBlank(String s, String argument); }
LocalizedAssert { public <T> T assertNotNull(T o, String argument) { if (o == null) { throwException(DBMessages.ASSERT_NOT_NULL, argument); } return o; } LocalizedAssert(final ConnectorMessages cm);  LocalizedAssert(final ConnectorMessages cm, boolean localizeArguments); T assertNotNull(T o, String argument); T assertNull(T o, String argument); String assertNotBlank(String o, String argument); String assertBlank(String s, String argument);  }