Codota Logo
TestMonitor.assertNumberOfWarnings
Code IndexAdd Codota to your IDE (free)

How to use
assertNumberOfWarnings
method
in
io.airlift.configuration.TestMonitor

Best Java code snippets using io.airlift.configuration.TestMonitor.assertNumberOfWarnings (Showing top 20 results out of 315)

Refine searchRefine arrow

  • TestMonitor.<init>
  • Test.<init>
  • TestMonitor.assertNumberOfErrors
  • ConfigurationMetadata.getConfigurationMetadata
  • ConfigurationMetadataTest.verifyMetaData
  • TestMonitor.assertMatchingErrorRecorded
  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: airlift/airlift

@Test
public void testNotJavaBeanClass()
    throws Exception
{
  TestMonitor monitor = new TestMonitor();
  ConfigurationMetadata<?> metadata = ConfigurationMetadata.getConfigurationMetadata(NotJavaBeanClass.class, monitor);
  Map<String, Set<String>> expectedAttributes = new HashMap<>();
  verifyMetaData(metadata, NotJavaBeanClass.class, null, false, expectedAttributes);
  monitor.assertNumberOfErrors(1);
  monitor.assertNumberOfWarnings(0);
  monitor.assertMatchingErrorRecorded("not a valid setter", "putValue");
}
origin: airlift/airlift

@Test
public void testEmptyPropertyNameClass()
    throws Exception
{
  TestMonitor monitor = new TestMonitor();
  ConfigurationMetadata<?> metadata = ConfigurationMetadata.getConfigurationMetadata(EmptyPropertyNameClass.class, monitor);
  Map<String, Set<String>> expectedAttributes = new HashMap<>();
  verifyMetaData(metadata, EmptyPropertyNameClass.class, null, false, expectedAttributes);
  monitor.assertNumberOfErrors(1);
  monitor.assertNumberOfWarnings(0);
  monitor.assertMatchingErrorRecorded("empty value", "setValue");
}
origin: io.airlift/configuration

@Test
public void testNotPublicAttributeClass()
    throws Exception
{
  TestMonitor monitor = new TestMonitor();
  ConfigurationMetadata<?> metadata = ConfigurationMetadata.getConfigurationMetadata(NotPublicAttributeClass.class, monitor);
  Map<String, Set<String>> expectedAttributes = new HashMap<>();
  verifyMetaData(metadata, NotPublicAttributeClass.class, null, false, expectedAttributes);
  monitor.assertNumberOfErrors(1);
  monitor.assertNumberOfWarnings(0);
  monitor.assertMatchingErrorRecorded("No getter", "unusable", "getValue", "setValue");
}
origin: io.airlift/configuration

@Test
public void testIsMethodNoReturnClass()
    throws Exception
{
  TestMonitor monitor = new TestMonitor();
  ConfigurationMetadata<?> metadata = ConfigurationMetadata.getConfigurationMetadata(IsMethodNoReturnClass.class, monitor);
  Map<String, Set<String>> expectedAttributes = new HashMap<>();
  verifyMetaData(metadata, IsMethodNoReturnClass.class, null, false, expectedAttributes);
  monitor.assertNumberOfErrors(1);
  monitor.assertNumberOfWarnings(0);
  monitor.assertMatchingErrorRecorded("No getter", "setValue");
}
origin: airlift/airlift

@Test
public void testLegacyConfigDuplicatesConfigClass()
    throws Exception
{
  TestMonitor monitor = new TestMonitor();
  ConfigurationMetadata<?> metadata = ConfigurationMetadata.getConfigurationMetadata(LegacyConfigDuplicatesConfigClass.class, monitor);
  Map<String, Set<String>> expectedAttributes = new HashMap<>();
  verifyMetaData(metadata, LegacyConfigDuplicatesConfigClass.class, null, false, expectedAttributes);
  monitor.assertNumberOfErrors(1);
  monitor.assertNumberOfWarnings(0);
  monitor.assertMatchingErrorRecorded("@Config property", "'value'", "appears in @LegacyConfig", "setValue");
}
origin: io.airlift/configuration

@Test
public void testIsMethodWithParameterClass()
    throws Exception
{
  TestMonitor monitor = new TestMonitor();
  ConfigurationMetadata<?> metadata = ConfigurationMetadata.getConfigurationMetadata(IsMethodWithParameterClass.class, monitor);
  Map<String, Set<String>> expectedAttributes = new HashMap<>();
  verifyMetaData(metadata, IsMethodWithParameterClass.class, null, false, expectedAttributes);
  monitor.assertNumberOfErrors(1);
  monitor.assertNumberOfWarnings(0);
  monitor.assertMatchingErrorRecorded("No getter", "unusable", "isValue", "setValue");
}
origin: io.airlift/configuration

@Test
public void testEmptyPropertyNameClass()
    throws Exception
{
  TestMonitor monitor = new TestMonitor();
  ConfigurationMetadata<?> metadata = ConfigurationMetadata.getConfigurationMetadata(EmptyPropertyNameClass.class, monitor);
  Map<String, Set<String>> expectedAttributes = new HashMap<>();
  verifyMetaData(metadata, EmptyPropertyNameClass.class, null, false, expectedAttributes);
  monitor.assertNumberOfErrors(1);
  monitor.assertNumberOfWarnings(0);
  monitor.assertMatchingErrorRecorded("empty value", "setValue");
}
origin: airlift/airlift

@Test
public void testIsMethodNoSetterClass()
    throws Exception
{
  TestMonitor monitor = new TestMonitor();
  ConfigurationMetadata<?> metadata = ConfigurationMetadata.getConfigurationMetadata(IsMethodNoSetterClass.class, monitor);
  Map<String, Set<String>> expectedAttributes = new HashMap<>();
  verifyMetaData(metadata, IsMethodNoSetterClass.class, null, false, expectedAttributes);
  monitor.assertNumberOfErrors(1);
  monitor.assertNumberOfWarnings(0);
  monitor.assertMatchingErrorRecorded(IsMethodNoSetterClass.class.getName(), "isValue", "is not a valid setter");
}
origin: io.airlift/configuration

@Test
public void testSetterWithNoParameterClass()
    throws Exception
{
  TestMonitor monitor = new TestMonitor();
  ConfigurationMetadata<?> metadata = ConfigurationMetadata.getConfigurationMetadata(SetterWithNoParameterClass.class, monitor);
  Map<String, Set<String>> expectedAttributes = new HashMap<>();
  verifyMetaData(metadata, SetterWithNoParameterClass.class, null, false, expectedAttributes);
  monitor.assertNumberOfErrors(1);
  monitor.assertNumberOfWarnings(0);
  monitor.assertMatchingErrorRecorded("does not have exactly one parameter", SetterWithNoParameterClass.class.getName(), "setValue");
}
origin: io.airlift/configuration

@Test
public void testNoConfigMethodsClass()
    throws Exception
{
  TestMonitor monitor = new TestMonitor();
  ConfigurationMetadata<?> metadata = ConfigurationMetadata.getConfigurationMetadata(NoConfigMethodsClass.class, monitor);
  Map<String, Set<String>> expectedAttributes = new HashMap<>();
  verifyMetaData(metadata, NoConfigMethodsClass.class, null, false, expectedAttributes);
  monitor.assertNumberOfErrors(1);
  monitor.assertNumberOfWarnings(0);
  monitor.assertMatchingErrorRecorded("does not have any @Config annotations", NoConfigMethodsClass.class.getName());
}
origin: airlift/airlift

@Test
public void testGetterWithParameterClass()
    throws Exception
{
  TestMonitor monitor = new TestMonitor();
  ConfigurationMetadata<?> metadata = ConfigurationMetadata.getConfigurationMetadata(GetterWithParameterClass.class, monitor);
  Map<String, Set<String>> expectedAttributes = new HashMap<>();
  verifyMetaData(metadata, GetterWithParameterClass.class, null, false, expectedAttributes);
  monitor.assertNumberOfErrors(1);
  monitor.assertNumberOfWarnings(0);
  monitor.assertMatchingErrorRecorded("No getter", "unusable", "getValue", "setValue");
}
origin: airlift/airlift

@Test
public void testGetterNoReturnClass()
    throws Exception
{
  TestMonitor monitor = new TestMonitor();
  ConfigurationMetadata<?> metadata = ConfigurationMetadata.getConfigurationMetadata(GetterNoReturnClass.class, monitor);
  Map<String, Set<String>> expectedAttributes = new HashMap<>();
  verifyMetaData(metadata, GetterNoReturnClass.class, null, false, expectedAttributes);
  monitor.assertNumberOfErrors(1);
  monitor.assertNumberOfWarnings(0);
  monitor.assertMatchingErrorRecorded("No getter", "unusable", "getValue", "setValue");
}
origin: io.airlift/configuration

@Test
public void testNotJavaBeanClass()
    throws Exception
{
  TestMonitor monitor = new TestMonitor();
  ConfigurationMetadata<?> metadata = ConfigurationMetadata.getConfigurationMetadata(NotJavaBeanClass.class, monitor);
  Map<String, Set<String>> expectedAttributes = new HashMap<>();
  verifyMetaData(metadata, NotJavaBeanClass.class, null, false, expectedAttributes);
  monitor.assertNumberOfErrors(1);
  monitor.assertNumberOfWarnings(0);
  monitor.assertMatchingErrorRecorded("not a valid setter", "putValue");
}
origin: com.teradata.airlift/configuration

@Test
public void testGetterPrivateSetterClass()
    throws Exception
{
  TestMonitor monitor = new TestMonitor();
  ConfigurationMetadata<?> metadata = ConfigurationMetadata.getConfigurationMetadata(GetterPrivateSetterClass.class, monitor);
  Map<String, Set<String>> expectedAttributes = Maps.newHashMap();
  verifyMetaData(metadata, GetterPrivateSetterClass.class, null, expectedAttributes);
  monitor.assertNumberOfErrors(1);
  monitor.assertNumberOfWarnings(0);
  monitor.assertMatchingErrorRecorded("@Config method", "setValue", "is not public");
}
origin: com.teradata.airlift/configuration

@Test
public void testLegacyConfigDuplicatesConfigClass()
    throws Exception
{
  TestMonitor monitor = new TestMonitor();
  ConfigurationMetadata<?> metadata = ConfigurationMetadata.getConfigurationMetadata(LegacyConfigDuplicatesConfigClass.class, monitor);
  Map<String, Set<String>> expectedAttributes = Maps.newHashMap();
  verifyMetaData(metadata, LegacyConfigDuplicatesConfigClass.class, null, expectedAttributes);
  monitor.assertNumberOfErrors(1);
  monitor.assertNumberOfWarnings(0);
  monitor.assertMatchingErrorRecorded("@Config property", "'value'", "appears in @LegacyConfig", "setValue");
}
origin: airlift/airlift

@Test
public void testEmptyStringLegacyConfigClass()
    throws Exception
{
  TestMonitor monitor = new TestMonitor();
  ConfigurationMetadata<?> metadata = ConfigurationMetadata.getConfigurationMetadata(EmptyStringLegacyConfigClass.class, monitor);
  Map<String, Set<String>> expectedAttributes = new HashMap<>();
  verifyMetaData(metadata, EmptyStringLegacyConfigClass.class, null, false, expectedAttributes);
  monitor.assertNumberOfErrors(1);
  monitor.assertNumberOfWarnings(0);
  monitor.assertMatchingErrorRecorded("@LegacyConfig method", EmptyStringLegacyConfigClass.class.getName(), "setValue", "null or empty value");
}
origin: airlift/airlift

@Test
public void testIsMethodPrivateSetterClass()
    throws Exception
{
  TestMonitor monitor = new TestMonitor();
  ConfigurationMetadata<?> metadata = ConfigurationMetadata.getConfigurationMetadata(IsMethodPrivateSetterClass.class, monitor);
  Map<String, Set<String>> expectedAttributes = new HashMap<>();
  verifyMetaData(metadata, IsMethodPrivateSetterClass.class, null, false, expectedAttributes);
  monitor.assertNumberOfErrors(1);
  monitor.assertNumberOfWarnings(0);
  monitor.assertMatchingErrorRecorded("@Config method", IsMethodPrivateSetterClass.class.getName(), "setValue", "is not public");
}
origin: airlift/airlift

@Test
public void testSetterWithNoParameterClass()
    throws Exception
{
  TestMonitor monitor = new TestMonitor();
  ConfigurationMetadata<?> metadata = ConfigurationMetadata.getConfigurationMetadata(SetterWithNoParameterClass.class, monitor);
  Map<String, Set<String>> expectedAttributes = new HashMap<>();
  verifyMetaData(metadata, SetterWithNoParameterClass.class, null, false, expectedAttributes);
  monitor.assertNumberOfErrors(1);
  monitor.assertNumberOfWarnings(0);
  monitor.assertMatchingErrorRecorded("does not have exactly one parameter", SetterWithNoParameterClass.class.getName(), "setValue");
}
origin: airlift/airlift

@Test
public void testNoConfigMethodsClass()
    throws Exception
{
  TestMonitor monitor = new TestMonitor();
  ConfigurationMetadata<?> metadata = ConfigurationMetadata.getConfigurationMetadata(NoConfigMethodsClass.class, monitor);
  Map<String, Set<String>> expectedAttributes = new HashMap<>();
  verifyMetaData(metadata, NoConfigMethodsClass.class, null, false, expectedAttributes);
  monitor.assertNumberOfErrors(1);
  monitor.assertNumberOfWarnings(0);
  monitor.assertMatchingErrorRecorded("does not have any @Config annotations", NoConfigMethodsClass.class.getName());
}
origin: io.airlift/configuration

@Test
public void testIsMethodNoSetterClass()
    throws Exception
{
  TestMonitor monitor = new TestMonitor();
  ConfigurationMetadata<?> metadata = ConfigurationMetadata.getConfigurationMetadata(IsMethodNoSetterClass.class, monitor);
  Map<String, Set<String>> expectedAttributes = new HashMap<>();
  verifyMetaData(metadata, IsMethodNoSetterClass.class, null, false, expectedAttributes);
  monitor.assertNumberOfErrors(1);
  monitor.assertNumberOfWarnings(0);
  monitor.assertMatchingErrorRecorded(IsMethodNoSetterClass.class.getName(), "isValue", "is not a valid setter");
}
io.airlift.configurationTestMonitorassertNumberOfWarnings

Popular methods of TestMonitor

  • <init>
  • assertMatchingErrorRecorded
  • assertMatchingWarningRecorded
  • assertNumberOfErrors
  • errorsString
  • messageListAsString
  • warningsString
  • lockAndWait

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setScale (BigDecimal)
  • notifyDataSetChanged (ArrayAdapter)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now