@Test public void testLocalizeArgumentNames() { LocalizedAssert la = new LocalizedAssert(new TestConnectorMessages(), true); try { la.assertNotBlank("", "assert.blank"); Assert.fail("Must fail for blank String"); } catch (RuntimeException e) { Assert.assertEquals("Argument [Argument [{0}] must be blank] cannot be blank", e .getMessage()); } }
public String assertNotBlank(String o, String argument) { if (o == null || o.length() == 0) { throwException(DBMessages.ASSERT_NOT_BLANK, argument); } return o; }
LocalizedAssert { public String assertNotBlank(String o, String argument) { if (o == null || o.length() == 0) { throwException(DBMessages.ASSERT_NOT_BLANK, argument); } return o; } }
LocalizedAssert { public String assertNotBlank(String o, String argument) { if (o == null || o.length() == 0) { throwException(DBMessages.ASSERT_NOT_BLANK, argument); } return o; } LocalizedAssert(final ConnectorMessages cm);  LocalizedAssert(final ConnectorMessages cm, boolean localizeArguments); }
LocalizedAssert { public String assertNotBlank(String o, String argument) { if (o == null || o.length() == 0) { throwException(DBMessages.ASSERT_NOT_BLANK, 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 String assertNotBlank(String o, String argument) { if (o == null || o.length() == 0) { throwException(DBMessages.ASSERT_NOT_BLANK, 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);  }