use of org.devgateway.ocds.persistence.mongo.Organization in project ocvn by devgateway.
the class OrganizationEndpointsTest method testSupplierIdEndpoint.
@Test
public void testSupplierIdEndpoint() {
final Organization organizationId = supplierSearchController.byId(ORG_ID);
Assert.assertNull(organizationId);
}
use of org.devgateway.ocds.persistence.mongo.Organization in project ocvn by devgateway.
the class OrganizationEndpointsTest method testProcuringEntityIdEndpoint.
@Test
public void testProcuringEntityIdEndpoint() {
final Organization organizationId = procuringEntitySearchController.byId(ORG_ID);
Assert.assertNotNull(organizationId);
}
use of org.devgateway.ocds.persistence.mongo.Organization in project ocvn by devgateway.
the class OrganizationEndpointsTest method testProcuringEntitySearchText.
@Test
public void testProcuringEntitySearchText() {
final TextSearchRequest osr = new TextSearchRequest();
osr.setText("Development");
final List<Organization> organizations = procuringEntitySearchController.searchText(osr);
Assert.assertEquals(1, organizations.size(), 0);
}
use of org.devgateway.ocds.persistence.mongo.Organization in project oc-explorer by devgateway.
the class OrganizationEndpointsTest method importTestData.
@Before
public void importTestData() throws IOException, InterruptedException {
organizationRepository.deleteAll();
final Organization organization = new Organization();
organization.setName("Development Gateway");
organization.setId(ORG_ID);
final Address address = new Address();
address.setCountryName("Romania");
address.setLocality("Bucuresti");
address.setPostalCode("022671");
address.setRegion("Bucuresti");
address.setStreetAddress("7 Sos. Iancului");
organization.setAddress(address);
final ContactPoint contactPoint = new ContactPoint();
contactPoint.setEmail("mpostelnicu@developmentgateway.org");
contactPoint.setFaxNumber("01234567");
contactPoint.setTelephone("01234567");
try {
contactPoint.setUrl(new URI("http://developmentgateway.org"));
} catch (URISyntaxException e) {
e.printStackTrace();
}
organization.setContactPoint(contactPoint);
final Identifier identifier = new Identifier();
identifier.setId(ORG_ID);
organization.getAdditionalIdentifiers().add(identifier);
organization.getRoles().add(Organization.OrganizationType.procuringEntity.toString());
organization.getRoles().add(Organization.OrganizationType.buyer.toString());
final Organization savedOrganization = organizationRepository.save(organization);
Assert.assertNotNull(savedOrganization);
Assert.assertEquals(ORG_ID, savedOrganization.getId());
}
use of org.devgateway.ocds.persistence.mongo.Organization in project oc-explorer by devgateway.
the class OrganizationEndpointsTest method testBuyerIdEndpoint.
@Test
public void testBuyerIdEndpoint() {
final Organization organizationId = buyerSearchController.byId(ORG_ID);
Assert.assertNotNull(organizationId);
}
Aggregations