congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
TestMonitor.assertMatchingErrorRecorded
Code IndexAdd Tabnine to your IDE (free)

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

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

Refine searchRefine arrow

  • TestMonitor.assertNumberOfWarnings
  • Test.<init>
  • TestMonitor.<init>
  • TestMonitor.assertNumberOfErrors
  • ConfigurationMetadata.getConfigurationMetadata
  • ConfigurationMetadataTest.verifyMetaData
origin: airlift/airlift

@Test
public void testLegacyConfigOnGetterClass()
    throws Exception
{
  TestMonitor monitor = new TestMonitor();
  ConfigurationMetadata<?> metadata = ConfigurationMetadata.getConfigurationMetadata(LegacyConfigOnGetterClass.class, monitor);
  monitor.assertNumberOfErrors(2);
  monitor.assertNumberOfWarnings(0);
  monitor.assertMatchingErrorRecorded("not a valid setter", "getValue");
  monitor.assertMatchingErrorRecorded("LegacyConfig", "getValue", "not associated with any valid @Config");
}
origin: io.airlift/configuration

@Test
public void testLegacyConfigOnGetterClass()
    throws Exception
{
  TestMonitor monitor = new TestMonitor();
  ConfigurationMetadata<?> metadata = ConfigurationMetadata.getConfigurationMetadata(LegacyConfigOnGetterClass.class, monitor);
  monitor.assertNumberOfErrors(2);
  monitor.assertNumberOfWarnings(0);
  monitor.assertMatchingErrorRecorded("not a valid setter", "getValue");
  monitor.assertMatchingErrorRecorded("LegacyConfig", "getValue", "not associated with any valid @Config");
}
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: 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: 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 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: airlift/airlift

@Test
public void testLegacyConfigOnSetterClass()
    throws Exception
{
  TestMonitor monitor = new TestMonitor();
  ConfigurationMetadata<?> metadata = ConfigurationMetadata.getConfigurationMetadata(LegacyConfigOnSetterClass.class, monitor);
  monitor.assertNumberOfErrors(1);
  monitor.assertNumberOfWarnings(0);
  monitor.assertMatchingErrorRecorded("LegacyConfig", "setValue", "not associated with any valid @Config");
}
origin: io.airlift/configuration

@Test
public void testCurrentConfigWithReplacedByClass()
    throws Exception
{
  TestMonitor monitor = new TestMonitor();
  ConfigurationMetadata<?> metadata = ConfigurationMetadata.getConfigurationMetadata(CurrentConfigWithReplacedByClass.class, monitor);
  monitor.assertNumberOfErrors(1);
  monitor.assertNumberOfWarnings(0);
  monitor.assertMatchingErrorRecorded("@Config method", "setValue", "claiming to be replaced by", "'other-name'");
}
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 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 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: 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 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 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: com.teradata.airlift/configuration

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

@Test
public void testCurrentAndLegacyConfigOnGetterClass()
    throws Exception
{
  TestMonitor monitor = new TestMonitor();
  ConfigurationMetadata<?> metadata = ConfigurationMetadata.getConfigurationMetadata(CurrentAndLegacyConfigOnGetterClass.class, monitor);
  monitor.assertNumberOfErrors(1);
  monitor.assertNumberOfWarnings(0);
  monitor.assertMatchingErrorRecorded("not a valid setter", "getValue");
}
origin: com.teradata.airlift/configuration

@Test
public void testMultipleAnnotatedSettersClass()
    throws Exception
{
  TestMonitor monitor = new TestMonitor();
  ConfigurationMetadata<?> metadata = ConfigurationMetadata.getConfigurationMetadata(MultipleAnnotatedSettersClass.class, monitor);
  // Not validating metadata, since the actual setter it picks is not deterministic
  monitor.assertNumberOfErrors(1);
  monitor.assertNumberOfWarnings(0);
  monitor.assertMatchingErrorRecorded("Multiple methods are annotated", "Value");
}
io.airlift.configurationTestMonitorassertMatchingErrorRecorded

Popular methods of TestMonitor

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

Popular in Java

  • Making http requests using okhttp
  • getSystemService (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • runOnUiThread (Activity)
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • JTable (javax.swing)
  • 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
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now