Permalink
Browse files

cleanup work

  • Loading branch information...
1 parent 5bd981f commit 927f880f8029fa3a8f2ece3bd13933bdc259e9ce @eugenp committed Mar 21, 2012
@@ -1,7 +1,5 @@
package org.rest.sec.web.privilege;
-import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic;
-
import org.rest.client.template.impl.PrivilegeRESTTemplateImpl;
import org.rest.sec.model.Privilege;
import org.rest.sec.test.SecLogicRESTIntegrationTest;
@@ -23,11 +21,6 @@ public PrivilegeLogicRESTIntegrationTest() {
// template
@Override
- protected final Privilege createNewEntity() {
- return restTemplate.createNewEntity();
- }
-
- @Override
protected final PrivilegeRESTTemplateImpl getTemplate() {
return restTemplate;
}
@@ -38,16 +31,6 @@ protected final String getURI() {
}
@Override
- protected final void change(final Privilege resource) {
- resource.setName(randomAlphabetic(6));
- }
-
- @Override
- protected final void invalidate(final Privilege resource) {
- getTemplate().invalidate(resource);
- }
-
- @Override
protected final RequestSpecification givenAuthenticated() {
return getTemplate().givenAuthenticated();
}
@@ -161,11 +161,6 @@ public final void whenCreatingNewResourceWithExistingAssociations_thenNewResourc
// template
@Override
- protected final Role createNewEntity() {
- return restTemplate.createNewEntity();
- }
-
- @Override
protected final RoleRESTTemplateImpl getTemplate() {
return restTemplate;
}
@@ -176,16 +171,6 @@ protected final String getURI() {
}
@Override
- protected final void change(final Role resource) {
- resource.setName(randomAlphabetic(6));
- }
-
- @Override
- protected final void invalidate(final Role resource) {
- getTemplate().invalidate(resource);
- }
-
- @Override
protected final RequestSpecification givenAuthenticated() {
return getTemplate().givenAuthenticated();
}
@@ -125,26 +125,11 @@ public final void whenScenarioOfWorkingWithAssociations_thenTheChangesAreCorrect
// template method
@Override
- protected final User createNewEntity() {
- return getTemplate().createNewEntity();
- }
-
- @Override
protected final String getURI() {
return getTemplate().getURI() + "/";
}
@Override
- protected final void change(final User resource) {
- resource.setName(randomAlphabetic(6));
- }
-
- @Override
- protected final void invalidate(final User resource) {
- getTemplate().invalidate(resource);
- }
-
- @Override
protected final RequestSpecification givenAuthenticated() {
return getTemplate().givenAuthenticated();
}
@@ -8,7 +8,7 @@ private IDUtils() {
throw new AssertionError();
}
- //
+ // API
public final static long randomPositiveLong() {
long id = new Random().nextLong() * 10000;
Oops, something went wrong.

0 comments on commit 927f880

Please sign in to comment.