use of org.codehaus.jackson.map.ObjectMapper in project head by mifos.
the class RESTAPITest method savingsDueByGlobalNum.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(groups = "readOnly")
public void savingsDueByGlobalNum() throws Exception {
String type = Type.SAVINGS;
String by = By.GLOBAL_NUMBER;
String value = SAVINGS_MANDATORY_ACCOUNT_GLOBAL_ID + Op.DUE;
String actualJSON = helper.getJSONFromUI(type, by, value);
String expectedJSON = helper.getJSONFromDataSet(type, by, value);
ObjectMapper mapper = helper.getObjectMapper();
Assert.assertEquals(mapper.readTree(expectedJSON), mapper.readTree(actualJSON));
}
use of org.codehaus.jackson.map.ObjectMapper in project head by mifos.
the class RESTAPITest method paymentTypesByAcceptedState.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(groups = "readOnly")
public void paymentTypesByAcceptedState() throws Exception {
String type = Type.PAYMENT_TYPES;
String by = By.STATE;
String value = PAYMENT_TYPES_ACCEPTED;
String actualJSON = helper.getJSONFromUI(type, by, value);
String expectedJSON = helper.getJSONFromDataSet(type, by, value);
ObjectMapper mapper = helper.getObjectMapper();
Assert.assertEquals(mapper.readTree(expectedJSON), mapper.readTree(actualJSON));
}
use of org.codehaus.jackson.map.ObjectMapper in project head by mifos.
the class RESTAPITest method officeById.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(groups = "readOnly")
public void officeById() throws Exception {
String type = Type.OFFICE;
String by = By.ID;
String value = OFFICE_ID;
String actualJSON = helper.getJSONFromUI(type, by, value);
String expectedJSON = helper.getJSONFromDataSet(type, by, value);
ObjectMapper mapper = helper.getObjectMapper();
Assert.assertEquals(mapper.readTree(expectedJSON), mapper.readTree(actualJSON));
}
use of org.codehaus.jackson.map.ObjectMapper in project head by mifos.
the class RESTAPITest method clientByGlobalNum.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(groups = "readOnly")
public void clientByGlobalNum() throws Exception {
String type = Type.CLIENT;
String by = By.GLOBAL_NUMBER;
String value = CLIENT_GLOBAL_ID;
String actualJSON = helper.getJSONFromUI(type, by, value);
String expectedJSON = helper.getJSONFromDataSet(type, by, value);
ObjectMapper mapper = helper.getObjectMapper();
Assert.assertEquals(mapper.readTree(expectedJSON), mapper.readTree(actualJSON));
}
use of org.codehaus.jackson.map.ObjectMapper in project head by mifos.
the class RESTAPITest method clientChargesByGlobalNum.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(groups = "readOnly")
public void clientChargesByGlobalNum() throws Exception {
String type = Type.CLIENT;
String by = By.GLOBAL_NUMBER;
String value = CLIENT_GLOBAL_ID + Op.CHARGES;
String actualJSON = helper.getJSONFromUI(type, by, value);
String expectedJSON = helper.getJSONFromDataSet(type, by, value);
ObjectMapper mapper = helper.getObjectMapper();
Assert.assertEquals(mapper.readTree(expectedJSON), mapper.readTree(actualJSON));
}
Aggregations