Browse Source

Delete unused test entities.

pull/1/head
Luke Taylor 15 years ago
parent
commit
244047ffe9
  1. 51
      core/src/test/java/org/springframework/security/access/annotation/test/Entity.java
  2. 43
      core/src/test/java/org/springframework/security/access/annotation/test/Organisation.java
  3. 26
      core/src/test/java/org/springframework/security/access/annotation/test/OrganisationService.java
  4. 27
      core/src/test/java/org/springframework/security/access/annotation/test/OrganisationServiceImpl.java
  5. 43
      core/src/test/java/org/springframework/security/access/annotation/test/Person.java
  6. 25
      core/src/test/java/org/springframework/security/access/annotation/test/PersonService.java
  7. 28
      core/src/test/java/org/springframework/security/access/annotation/test/PersonServiceImpl.java
  8. 36
      core/src/test/java/org/springframework/security/access/annotation/test/Service.java
  9. 42
      core/src/test/java/org/springframework/security/access/annotation/test/ServiceImpl.java

51
core/src/test/java/org/springframework/security/access/annotation/test/Entity.java

@ -1,51 +0,0 @@ @@ -1,51 +0,0 @@
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.security.access.annotation.test;
import org.springframework.util.Assert;
/**
* An entity used in our generics testing.
*
* @author Ben Alex
*/
public class Entity {
//~ Instance fields ================================================================================================
String info;
//~ Constructors ===================================================================================================
public Entity(String info) {
Assert.hasText(info, "Some information must be given!");
this.info = info;
}
//~ Methods ========================================================================================================
public String getInfo() {
return info;
}
void makeLowercase() {
this.info = info.toLowerCase();
}
void makeUppercase() {
this.info = info.toUpperCase();
}
}

43
core/src/test/java/org/springframework/security/access/annotation/test/Organisation.java

@ -1,43 +0,0 @@ @@ -1,43 +0,0 @@
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.security.access.annotation.test;
/**
* An extended version of <code>Entity</code>.
*
* @author Ben Alex
*/
public class Organisation extends Entity {
//~ Instance fields ================================================================================================
private boolean active = true;
//~ Constructors ===================================================================================================
public Organisation(String name) {
super(name);
}
//~ Methods ========================================================================================================
void deactive() {
this.active = true;
}
public boolean isActive() {
return this.active;
}
}

26
core/src/test/java/org/springframework/security/access/annotation/test/OrganisationService.java

@ -1,26 +0,0 @@ @@ -1,26 +0,0 @@
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.security.access.annotation.test;
/**
* DOCUMENT ME!
*
*/
public interface OrganisationService extends Service<Organisation> {
//~ Methods ========================================================================================================
public void deactive(Organisation org);
}

27
core/src/test/java/org/springframework/security/access/annotation/test/OrganisationServiceImpl.java

@ -1,27 +0,0 @@ @@ -1,27 +0,0 @@
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.security.access.annotation.test;
/**
*
*/
public class OrganisationServiceImpl extends ServiceImpl<Organisation> implements OrganisationService {
//~ Methods ========================================================================================================
public void deactive(Organisation org) {
org.deactive();
}
}

43
core/src/test/java/org/springframework/security/access/annotation/test/Person.java

@ -1,43 +0,0 @@ @@ -1,43 +0,0 @@
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.security.access.annotation.test;
/**
* An extended version of <code>Entity</code>.
*
* @author Ben Alex
*/
public class Person extends Entity {
//~ Instance fields ================================================================================================
private boolean active = true;
//~ Constructors ===================================================================================================
public Person(String name) {
super(name);
}
//~ Methods ========================================================================================================
void deactive() {
this.active = true;
}
public boolean isActive() {
return this.active;
}
}

25
core/src/test/java/org/springframework/security/access/annotation/test/PersonService.java

@ -1,25 +0,0 @@ @@ -1,25 +0,0 @@
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.security.access.annotation.test;
/**
*
*/
public interface PersonService extends Service<Person> {
//~ Methods ========================================================================================================
public void deactive(Person person);
}

28
core/src/test/java/org/springframework/security/access/annotation/test/PersonServiceImpl.java

@ -1,28 +0,0 @@ @@ -1,28 +0,0 @@
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.security.access.annotation.test;
/**
* DOCUMENT ME!
*
*/
public class PersonServiceImpl extends ServiceImpl<Person> implements PersonService {
//~ Methods ========================================================================================================
public void deactive(Person person) {
person.deactive();
}
}

36
core/src/test/java/org/springframework/security/access/annotation/test/Service.java

@ -1,36 +0,0 @@ @@ -1,36 +0,0 @@
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.security.access.annotation.test;
import java.util.Collection;
/**
* An interface that uses Java 5 generics.
*
* @author Ben Alex
*/
public interface Service<E extends Entity> {
//~ Methods ========================================================================================================
public int countElements(Collection<E> ids);
public void makeLowerCase(E input);
public void makeUpperCase(E input);
public void publicMakeLowerCase(E input);
}

42
core/src/test/java/org/springframework/security/access/annotation/test/ServiceImpl.java

@ -1,42 +0,0 @@ @@ -1,42 +0,0 @@
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.security.access.annotation.test;
import java.util.Collection;
/**
*
*/
public class ServiceImpl<E extends Entity> implements Service<E> {
//~ Methods ========================================================================================================
public int countElements(Collection<E> ids) {
return 0;
}
public void makeLowerCase(E input) {
input.makeLowercase();
}
public void makeUpperCase(E input) {
input.makeUppercase();
}
public void publicMakeLowerCase(E input) {
input.makeUppercase();
}
}
Loading…
Cancel
Save