com.google.caja.config
Class ConfigUtilTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.google.caja.util.CajaTestCase
              extended by com.google.caja.config.ConfigUtilTest
All Implemented Interfaces:
junit.framework.Test

public class ConfigUtilTest
extends CajaTestCase


Field Summary
private static java.lang.String JSON_ATOM
           
private static java.lang.String JSON_FLAT_OBJECT
           
private static java.lang.String JSON_NUMBER
           
private static java.lang.String JSON_STRING
           
 
Fields inherited from class com.google.caja.util.CajaTestCase
is, mc, mq, SEED
 
Constructor Summary
ConfigUtilTest()
           
 
Method Summary
private  void assertMessages(java.lang.String... golden)
           
private  FilePosition makeSrc()
           
 void testAllowed()
           
 void testAllowedOverridden()
           
 void testConflictsBetweenInheritedTypesResolved()
           
 void testDefinitionOverridden()
           
 void testDenied()
           
 void testDeniedOverridden()
           
 void testDuplicatedDefinitionsOk()
           
 void testEmptyConfigAllowNothing()
           
 void testMissingUrl()
           
 void testMisspelledDenied()
           
 void testOverriddenDuplicatedDefinitionsOk()
           
 void testUnresolvedAmbiguousDefinition()
           
 
Methods inherited from class com.google.caja.util.CajaTestCase
assertArrayEquals, assertCloneable, assertDeepEquals, assertMessage, assertMessage, assertMessagesLessSevereThan, assertNoErrors, assertNoMessage, assertNoWarnings, checkHeadless, css, css, cssDecls, cssDecls, dataFromResource, formatShort, fromResource, fromResource, fromString, fromString, fromString, html, htmlFragment, js, js, js, jsExpr, jsExpr, markup, markupFragment, minify, plain, quasi, render, render, renderProgram, runTest, setUp, tearDown, xml, xmlFragment
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

JSON_STRING

private static final java.lang.String JSON_STRING
See Also:
Constant Field Values

JSON_NUMBER

private static final java.lang.String JSON_NUMBER
See Also:
Constant Field Values

JSON_ATOM

private static final java.lang.String JSON_ATOM
See Also:
Constant Field Values

JSON_FLAT_OBJECT

private static final java.lang.String JSON_FLAT_OBJECT
See Also:
Constant Field Values
Constructor Detail

ConfigUtilTest

public ConfigUtilTest()
Method Detail

testEmptyConfigAllowNothing

public final void testEmptyConfigAllowNothing()
                                       throws java.lang.Exception
Throws:
java.lang.Exception

testAllowed

public final void testAllowed()
                       throws java.lang.Exception
Throws:
java.lang.Exception

testDenied

public final void testDenied()
                      throws java.lang.Exception
Throws:
java.lang.Exception

testMisspelledDenied

public final void testMisspelledDenied()
                                throws java.lang.Exception
Throws:
java.lang.Exception

testAllowedOverridden

public final void testAllowedOverridden()
                                 throws java.lang.Exception
Throws:
java.lang.Exception

testDeniedOverridden

public final void testDeniedOverridden()
                                throws java.lang.Exception
Throws:
java.lang.Exception

testDefinitionOverridden

public final void testDefinitionOverridden()
                                    throws java.lang.Exception
Throws:
java.lang.Exception

testMissingUrl

public final void testMissingUrl()
                          throws java.lang.Exception
Throws:
java.lang.Exception

testDuplicatedDefinitionsOk

public final void testDuplicatedDefinitionsOk()
                                       throws java.lang.Exception
Throws:
java.lang.Exception

testOverriddenDuplicatedDefinitionsOk

public final void testOverriddenDuplicatedDefinitionsOk()
                                                 throws java.lang.Exception
Throws:
java.lang.Exception

testUnresolvedAmbiguousDefinition

public final void testUnresolvedAmbiguousDefinition()
                                             throws java.lang.Exception
Throws:
java.lang.Exception

testConflictsBetweenInheritedTypesResolved

public final void testConflictsBetweenInheritedTypesResolved()
                                                      throws java.lang.Exception
Throws:
java.lang.Exception

assertMessages

private void assertMessages(java.lang.String... golden)

makeSrc

private FilePosition makeSrc()


Copyright (C) 2008 Google Inc.
Licensed under the Apache License, Version 2.0