Search in sources :

Example 6 with OperationResult

use of com.developmentontheedge.be5.operation.OperationResult in project be5 by DevelopmentOnTheEdge.

the class StandardOperationsTest method executeEditWithParams.

private void executeEditWithParams(String params) {
    when(SqlServiceMock.mock.select(any(), any(), any())).thenReturn(getDps(ImmutableMap.of("name", "TestName", "value", 12345, "ID", 12L)));
    OperationResult operationResult = executeOperation("testtableAdmin", "All records", "Edit", "12", params).getSecond();
    assertEquals(OperationResult.redirect("table/testtableAdmin/All records"), operationResult);
    verify(SqlServiceMock.mock).select(eq("SELECT * FROM testtableAdmin WHERE ID =?"), any(), eq(12L));
}
Also used : OperationResult(com.developmentontheedge.be5.operation.OperationResult)

Aggregations

OperationResult (com.developmentontheedge.be5.operation.OperationResult)6 FormPresentation (com.developmentontheedge.be5.model.FormPresentation)2 ResourceData (com.developmentontheedge.be5.model.jsonapi.ResourceData)2 Operation (com.developmentontheedge.be5.operation.Operation)2 HashUrl (com.developmentontheedge.be5.util.HashUrl)2 Test (org.junit.Test)2 Be5Exception (com.developmentontheedge.be5.api.exceptions.Be5Exception)1 OperationExecutor (com.developmentontheedge.be5.api.services.OperationExecutor)1 ErrorModel (com.developmentontheedge.be5.model.jsonapi.ErrorModel)1 DocumentGenerator (com.developmentontheedge.be5.query.DocumentGenerator)1 OperationDBTest (com.developmentontheedge.be5.test.OperationDBTest)1 SqlMockOperationTest (com.developmentontheedge.be5.test.SqlMockOperationTest)1 ArrayList (java.util.ArrayList)1