-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#202 Remove SecurityContextHolder stuff
- Loading branch information
Showing
4 changed files
with
198 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
.../core/services-api/src/test/java/org/geoserver/geofence/services/util/RuleFilterTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package org.geoserver.geofence.services.util; | ||
|
||
import org.geoserver.geofence.services.dto.RuleFilter; | ||
import static org.junit.Assert.*; | ||
import org.junit.Test; | ||
|
||
/** | ||
* | ||
*/ | ||
public class RuleFilterTest { | ||
@Test | ||
public void testRole() { | ||
RuleFilter f = new RuleFilter(); | ||
f.setRole("pippo"); | ||
assertEquals("pippo", f.getRole().getText()); | ||
|
||
f.setRole("a,b"); | ||
assertEquals("a,b", f.getRole().getText()); | ||
|
||
f.setRole("b,a"); | ||
assertEquals("a,b", f.getRole().getText()); | ||
|
||
f.setRole("a, b"); | ||
assertEquals("a,b", f.getRole().getText()); | ||
|
||
f.setRole(" b , a "); | ||
assertEquals("a,b", f.getRole().getText()); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters