com.splunk.modularinput
Class SchemeTest

java.lang.Object
  extended by com.splunk.modularinput.ModularInputTestCase
      extended by com.splunk.modularinput.SchemeTest

public class SchemeTest
extends ModularInputTestCase

Tests for the com.splunk.modularinput.Scheme and com.splunk.modularinput.Argument classes that define a modular input scheme to send to Splunk.


Constructor Summary
SchemeTest()
           
 
Method Summary
 void testGenerateXmlFromArgument()
          Checks that the XML generated by an Argument class with all its possible values set is what we expect.
 void testGenerateXmlFromArgumentWithDefaultValues()
          Checks that the XML produced from an Argument class that is initialized but has no additional manipulations made to it is what we expect.
 void testGenerateXmlFromScheme()
          Checks that the XML generated by a Scheme object with all its fields set and some arguments added matches what we expect.
 void testGenerateXmlFromSchemeWithDefaultValues()
          Checks the Scheme generated by creating a Scheme object and setting no fields on it.
 
Methods inherited from class com.splunk.modularinput.ModularInputTestCase
assertXmlEqual, assertXmlEqual, nodeToXml, removeBlankTextNodes, resourceToXmlDocument, stringToXmlDocument, testCoercionMethods, testNormalizeBoolean
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemeTest

public SchemeTest()
Method Detail

testGenerateXmlFromSchemeWithDefaultValues

public void testGenerateXmlFromSchemeWithDefaultValues()
                                                throws javax.xml.transform.TransformerException,
                                                       javax.xml.parsers.ParserConfigurationException
Checks the Scheme generated by creating a Scheme object and setting no fields on it. This test checks for sane defaults in the class.

Throws:
javax.xml.transform.TransformerException
javax.xml.parsers.ParserConfigurationException

testGenerateXmlFromScheme

public void testGenerateXmlFromScheme()
                               throws javax.xml.transform.TransformerException,
                                      javax.xml.parsers.ParserConfigurationException
Checks that the XML generated by a Scheme object with all its fields set and some arguments added matches what we expect.

Throws:
javax.xml.transform.TransformerException
javax.xml.parsers.ParserConfigurationException

testGenerateXmlFromArgumentWithDefaultValues

public void testGenerateXmlFromArgumentWithDefaultValues()
                                                  throws javax.xml.parsers.ParserConfigurationException,
                                                         javax.xml.transform.TransformerException
Checks that the XML produced from an Argument class that is initialized but has no additional manipulations made to it is what we expect. This is mostly a check of the default values.

Throws:
javax.xml.parsers.ParserConfigurationException
javax.xml.transform.TransformerException

testGenerateXmlFromArgument

public void testGenerateXmlFromArgument()
                                 throws javax.xml.parsers.ParserConfigurationException,
                                        javax.xml.transform.TransformerException
Checks that the XML generated by an Argument class with all its possible values set is what we expect.

Throws:
javax.xml.parsers.ParserConfigurationException
javax.xml.transform.TransformerException