Package org.auraframework.util.json

Examples of org.auraframework.util.json.Json$IndentEntry


        assertTrue("JS resource should be in component", resourceDefs.contains(jsResourceDef));
        assertTrue("CSS resource should be in component", resourceDefs.contains(cssResourceDef));

        ByteArrayOutputStream baos = new ByteArrayOutputStream(512);
        Json json = Json.createJsonStream(baos, false, false, false);
        jsResourceDef.serialize(json);
        cssResourceDef.serialize(json);
        json.close();
        assertEquals("ResourceDefs are not serialized.", "", new String(baos.toByteArray(), Charsets.UTF_8));
    }
View Full Code Here


        TypeDef actual = buildDefinition().getTypeDef();
        assertEquals(expected, actual);
    }

    public void testSerializeDescriptor() throws Exception {
        Json json = Mockito.mock(Json.class);
        buildDefinition().serialize(json);
        InOrder inOrder = Mockito.inOrder(json);
        inOrder.verify(json).writeMapBegin();
        inOrder.verify(json).writeMapEntry("name", this.descriptor);
        inOrder.verify(json).writeMapEnd();
View Full Code Here

        inOrder.verify(json).writeMapEntry("name", this.descriptor);
        inOrder.verify(json).writeMapEnd();
    }

    public void testSerializeTypeDefDescriptor() throws Exception {
        Json json = Mockito.mock(Json.class);
        buildDefinition().serialize(json);
        InOrder inOrder = Mockito.inOrder(json);
        inOrder.verify(json).writeMapBegin();
        inOrder.verify(json).writeMapEntry("type", this.typeDefDescriptor);
        inOrder.verify(json).writeMapEnd();
View Full Code Here

        inOrder.verify(json).writeMapEnd();
    }

    public void testSerializeDefaultValue() throws Exception {
      this.defaultValue = new AttributeDefRefImpl.Builder().setValue("Hello").build();
        Json json = Mockito.mock(Json.class);
        AttributeDef def = buildDefinition();
    def.serialize(json);
        InOrder inOrder = Mockito.inOrder(json);
        inOrder.verify(json).writeMapBegin();
        inOrder.verify(json).writeMapEntry("default", "Hello");
View Full Code Here

    }

    public void testSerializeRequired() throws Exception {
        this.required = true;

        Json json = Mockito.mock(Json.class);
        buildDefinition().serialize(json);
        InOrder inOrder = Mockito.inOrder(json);
        inOrder.verify(json).writeMapBegin();
        inOrder.verify(json).writeMapEntry("required", this.required);
        inOrder.verify(json).writeMapEnd();
View Full Code Here

TOP

Related Classes of org.auraframework.util.json.Json$IndentEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.