use of org.devgateway.ocds.web.rest.controller.request.YearFilterPagingRequest in project ocvn by devgateway.
the class CorruptionRiskDashboardCrosstabTest method testI077CrossTab.
@Test
public void testI077CrossTab() {
List<DBObject> flagStats = flagI077CrosstabController.flagStats(new YearFilterPagingRequest());
Assert.assertEquals(0, flagStats.size());
}
use of org.devgateway.ocds.web.rest.controller.request.YearFilterPagingRequest in project ocvn by devgateway.
the class CorruptionRiskDashboardCrosstabTest method test180CrossTab.
@Test
public void test180CrossTab() {
List<DBObject> flagStats = flagI180CrosstabController.flagStats(new YearFilterPagingRequest());
Assert.assertEquals(0, flagStats.size());
}
use of org.devgateway.ocds.web.rest.controller.request.YearFilterPagingRequest in project ocvn by devgateway.
the class CorruptionRiskDashboardCrosstabTest method testI007CrossTab.
@Test
public void testI007CrossTab() {
List<DBObject> flagStats = flagI007CrosstabController.flagStats(new YearFilterPagingRequest());
Assert.assertEquals(1, flagStats.get(0).get(flagI007CrosstabController.getFlagDesignation(FlagsConstants.I007_VALUE)));
Assert.assertEquals(1, flagStats.get(0).get(flagI007CrosstabController.getFlagDesignation(FlagsConstants.I019_VALUE)));
}
use of org.devgateway.ocds.web.rest.controller.request.YearFilterPagingRequest in project ocvn by devgateway.
the class TotalCancelledTendersByYearControllerTest method totalCancelledTendersByYear.
@Test
public void totalCancelledTendersByYear() throws Exception {
final List<DBObject> totalCancelledTendersByYear = totalCancelledTendersByYearController.totalCancelledTendersByYear(new YearFilterPagingRequest());
// no cancelled tenders
Assert.assertEquals(0, totalCancelledTendersByYear.size());
}
use of org.devgateway.ocds.web.rest.controller.request.YearFilterPagingRequest in project ocvn by devgateway.
the class TenderPriceByTypeYearControllerTest method tenderPriceByBidSelectionMethod.
@Test
public void tenderPriceByBidSelectionMethod() throws Exception {
final List<DBObject> tenderPriceByBidSelectionMethod = tenderPriceByTypeYearController.tenderPriceByBidSelectionMethod(new YearFilterPagingRequest());
final DBObject first = tenderPriceByBidSelectionMethod.get(0);
Number totalTenderAmount = (Number) first.get(TenderPriceByTypeYearController.Keys.TOTAL_TENDER_AMOUNT);
String procurementMethodDetails = (String) first.get(TenderPriceByTypeYearController.Keys.PROCUREMENT_METHOD_DETAILS);
Assert.assertNull(procurementMethodDetails);
Assert.assertEquals(600000.0, totalTenderAmount.doubleValue(), 0);
final DBObject second = tenderPriceByBidSelectionMethod.get(1);
totalTenderAmount = (Number) second.get(TenderPriceByTypeYearController.Keys.TOTAL_TENDER_AMOUNT);
procurementMethodDetails = (String) second.get(TenderPriceByTypeYearController.Keys.PROCUREMENT_METHOD_DETAILS);
Assert.assertEquals("Competitive offers", procurementMethodDetails);
Assert.assertEquals(9000.0, totalTenderAmount.doubleValue(), 0);
}
Aggregations