Search in sources :

Example 11 with Meta

use of com.developmentontheedge.be5.api.services.Meta in project be5 by DevelopmentOnTheEdge.

the class ResponseTest method testJsonObject.

@Test
public void testJsonObject() {
    JsonApiModel jsonApiModel = JsonApiModel.data(new ResourceData("testType", "test", Collections.singletonMap(SELF_LINK, "url")), Collections.singletonMap(TIMESTAMP_PARAM, 1503291145939L));
    response.sendAsJson(jsonApiModel);
    verify(writer).append(doubleQuotes("{" + "'data':{'attributes':'test','links':{'self':'url'},'type':'testType'}," + "'meta':{'_ts_':1503291145939}" + "}"));
}
Also used : ResourceData(com.developmentontheedge.be5.model.jsonapi.ResourceData) JsonApiModel(com.developmentontheedge.be5.model.jsonapi.JsonApiModel) Test(org.junit.Test) Be5ProjectTest(com.developmentontheedge.be5.test.Be5ProjectTest)

Aggregations

Entity (com.developmentontheedge.be5.metadata.model.Entity)4 ArrayList (java.util.ArrayList)4 Meta (com.developmentontheedge.be5.api.services.Meta)3 Query (com.developmentontheedge.be5.metadata.model.Query)3 Template (freemarker.template.Template)3 Test (org.junit.Test)3 Action (com.developmentontheedge.be5.model.Action)2 HashMap (java.util.HashMap)2 ColumnDef (com.developmentontheedge.be5.metadata.model.ColumnDef)1 Operation (com.developmentontheedge.be5.metadata.model.Operation)1 Project (com.developmentontheedge.be5.metadata.model.Project)1 ErrorModel (com.developmentontheedge.be5.model.jsonapi.ErrorModel)1 JsonApiModel (com.developmentontheedge.be5.model.jsonapi.JsonApiModel)1 ResourceData (com.developmentontheedge.be5.model.jsonapi.ResourceData)1 Operation (com.developmentontheedge.be5.operation.Operation)1 OperationResult (com.developmentontheedge.be5.operation.OperationResult)1 Be5ProjectTest (com.developmentontheedge.be5.test.Be5ProjectTest)1 SqlMockOperationTest (com.developmentontheedge.be5.test.SqlMockOperationTest)1 Path (java.nio.file.Path)1 Paths (java.nio.file.Paths)1