use of org.candlepin.dto.api.v1.OwnerDTO in project candlepin by candlepin.
the class ActivationKeyResourceTest method testUpdateTooLongRelease.
@Test(expected = BadRequestException.class)
public void testUpdateTooLongRelease() {
ActivationKey key = new ActivationKey();
OwnerDTO ownerDto = new OwnerDTO();
key.setOwner(owner);
key.setName("dd");
key.setServiceLevel("level1");
key.setReleaseVer(new Release("release1"));
activationKeyCurator.create(key);
ActivationKeyDTO update = new ActivationKeyDTO();
update.setOwner(ownerDto);
update.setName("dd");
update.setServiceLevel("level1");
update.setReleaseVersion(TestUtil.getStringOfSize(256));
activationKeyResource.updateActivationKey(key.getId(), update);
}
use of org.candlepin.dto.api.v1.OwnerDTO in project candlepin by candlepin.
the class ConsumerResourceIntegrationTest method personalNameOverride.
@Test
public void personalNameOverride() {
ConsumerDTO personal = createConsumerDTO(personTypeDTO, ownerDTO);
personal = consumerResource.create(personal, principal, null, null, null, true);
// Not sure if this should be hard-coded to default
assertEquals(USER_NAME, personal.getName());
}
use of org.candlepin.dto.api.v1.OwnerDTO in project candlepin by candlepin.
the class ConsumerResourceIntegrationTest method onlyOnePersonalConsumer.
@Test(expected = BadRequestException.class)
public void onlyOnePersonalConsumer() {
ConsumerDTO personal = createConsumerDTO(personTypeDTO, ownerDTO);
consumerResource.create(personal, principal, null, null, null, true);
personal = createConsumerDTO(personTypeDTO, ownerDTO);
consumerResource.create(personal, principal, null, null, null, true);
}
Aggregations