use of org.eclipse.che.multiuser.organization.spi.impl.OrganizationImpl in project che-server by eclipse-che.
the class OrganizationDaoTest method shouldThrowConflictExceptionOnUpdatingOrganizationNameToExistingOne.
@Test(expectedExceptions = ConflictException.class)
public void shouldThrowConflictExceptionOnUpdatingOrganizationNameToExistingOne() throws Exception {
final OrganizationImpl toUpdate = new OrganizationImpl(organizations[0].getId(), organizations[1].getName(), "new-parent");
organizationDao.update(toUpdate);
}
use of org.eclipse.che.multiuser.organization.spi.impl.OrganizationImpl in project che-server by eclipse-che.
the class OrganizationDaoTest method setUp.
@BeforeMethod
private void setUp() throws TckRepositoryException {
organizations = new OrganizationImpl[2];
organizations[0] = new OrganizationImpl(NameGenerator.generate("organization", 10), "test1", null);
organizations[1] = new OrganizationImpl(NameGenerator.generate("organization", 10), "test2", null);
tckRepository.createAll(asList(organizations));
}
use of org.eclipse.che.multiuser.organization.spi.impl.OrganizationImpl in project che-server by eclipse-che.
the class OrganizationDaoTest method shouldThrowConflictExceptionOnCreatingOrganizationWithExistingName.
@Test(expectedExceptions = ConflictException.class)
public void shouldThrowConflictExceptionOnCreatingOrganizationWithExistingName() throws Exception {
final OrganizationImpl organization = new OrganizationImpl("organization123", organizations[0].getName(), null);
organizationDao.create(organization);
assertEquals(organizationDao.getById(organization.getId()), organization);
}
use of org.eclipse.che.multiuser.organization.spi.impl.OrganizationImpl in project che-server by eclipse-che.
the class OrganizationDaoTest method shouldGetOrganizationById.
@Test
public void shouldGetOrganizationById() throws Exception {
final OrganizationImpl organization = organizations[0];
final OrganizationImpl found = organizationDao.getById(organization.getId());
assertEquals(organization, found);
}
use of org.eclipse.che.multiuser.organization.spi.impl.OrganizationImpl in project che-server by eclipse-che.
the class OrganizationDaoTest method shouldCreateOrganization.
@Test
public void shouldCreateOrganization() throws Exception {
final OrganizationImpl organization = new OrganizationImpl("organization123", "Test", null);
organizationDao.create(organization);
assertEquals(organizationDao.getById(organization.getId()), organization);
}
Aggregations