Search in sources :

Example 16 with JsonMapGenerator

use of com.enonic.xp.script.serializer.JsonMapGenerator in project xp by enonic.

the class PushNodesResultMapperTest method single_deleted.

@Test
public void single_deleted() throws Exception {
    final PushNodesResult result = PushNodesResult.create().build();
    final JsonMapGenerator jsonGenerator = new JsonMapGenerator();
    new PushNodesResultMapper(result, NodeIds.from("a")).serialize(jsonGenerator);
    assertJson("nodeResult/single_deleted.json", jsonGenerator);
}
Also used : PushNodesResult(com.enonic.xp.node.PushNodesResult) JsonMapGenerator(com.enonic.xp.script.serializer.JsonMapGenerator) Test(org.junit.jupiter.api.Test)

Aggregations

JsonMapGenerator (com.enonic.xp.script.serializer.JsonMapGenerator)16 Test (org.junit.jupiter.api.Test)11 JsonNode (com.fasterxml.jackson.databind.JsonNode)8 URL (java.net.URL)5 PushNodesResult (com.enonic.xp.node.PushNodesResult)4 Aggregations (com.enonic.xp.aggregation.Aggregations)1 ContentQuery (com.enonic.xp.content.ContentQuery)1 Contents (com.enonic.xp.content.Contents)1 FindContentIdsByQueryResult (com.enonic.xp.content.FindContentIdsByQueryResult)1 GetContentByIdsParams (com.enonic.xp.content.GetContentByIdsParams)1 Context (com.enonic.xp.context.Context)1 Event (com.enonic.xp.event.Event)1 IndexConfigDocument (com.enonic.xp.index.IndexConfigDocument)1 PatternIndexConfigDocument (com.enonic.xp.index.PatternIndexConfigDocument)1 ContentsResultMapper (com.enonic.xp.lib.content.mapper.ContentsResultMapper)1 FindNodesByMultiRepoQueryResult (com.enonic.xp.node.FindNodesByMultiRepoQueryResult)1 NodeComparison (com.enonic.xp.node.NodeComparison)1 ResolveSyncWorkResult (com.enonic.xp.node.ResolveSyncWorkResult)1 ScriptValue (com.enonic.xp.script.ScriptValue)1 MapSerializable (com.enonic.xp.script.serializer.MapSerializable)1