use of org.devgateway.ocds.persistence.mongo.Organization in project oc-explorer by devgateway.
the class OrganizationRepositoryTest method testOrganizationSaveAndFind.
@Test
public void testOrganizationSaveAndFind() {
final Organization foundOrg = organizationRepository.findOne(ORG_ID);
Assert.assertNotNull(foundOrg);
final Organization foundOrg2 = organizationRepository.findByIdOrNameAndTypes(ORG_ID, Organization.OrganizationType.procuringEntity);
Assert.assertNotNull(foundOrg2);
final Organization foundOrg3 = organizationRepository.findByIdOrNameAndTypes(ORG_ID, Organization.OrganizationType.supplier);
Assert.assertNull(foundOrg3);
final Organization foundOrg4 = organizationRepository.findByIdOrNameAllIgnoreCase(ORG_ID, ORG_ID);
Assert.assertNotNull(foundOrg4);
}
Aggregations