Update TestDefaultSystemScopeService.java
parent
e697ac8d7a
commit
9f9e778d93
|
@ -55,7 +55,7 @@ public class TestDefaultSystemScopeService {
|
||||||
private SystemScope dynScope1;
|
private SystemScope dynScope1;
|
||||||
private SystemScope restrictedScope1;
|
private SystemScope restrictedScope1;
|
||||||
private SystemScope mySystemScope;
|
private SystemScope mySystemScope;
|
||||||
private SystemScope mysavedSystemScope;
|
private SystemScope mySavedSystemScope;
|
||||||
|
|
||||||
private String defaultDynScope1String = "defaultDynScope1";
|
private String defaultDynScope1String = "defaultDynScope1";
|
||||||
private String defaultDynScope2String = "defaultDynScope2";
|
private String defaultDynScope2String = "defaultDynScope2";
|
||||||
|
@ -63,7 +63,7 @@ public class TestDefaultSystemScopeService {
|
||||||
private String defaultScope2String = "defaultScope2";
|
private String defaultScope2String = "defaultScope2";
|
||||||
private String dynScope1String = "dynScope1";
|
private String dynScope1String = "dynScope1";
|
||||||
private String restrictedScope1String = "restrictedScope1";
|
private String restrictedScope1String = "restrictedScope1";
|
||||||
private String mysavedSystemScopeString = "mysavedSystemScope";
|
private String mySavedSystemScopeString = "mySavedSystemScope";
|
||||||
|
|
||||||
private Set<SystemScope> allScopes;
|
private Set<SystemScope> allScopes;
|
||||||
private Set<String> allScopeStrings;
|
private Set<String> allScopeStrings;
|
||||||
|
@ -91,7 +91,7 @@ public class TestDefaultSystemScopeService {
|
||||||
defaultDynScope1.setDefaultScope(true);
|
defaultDynScope1.setDefaultScope(true);
|
||||||
defaultDynScope2.setDefaultScope(true);
|
defaultDynScope2.setDefaultScope(true);
|
||||||
mySystemScope = new SystemScope();
|
mySystemScope = new SystemScope();
|
||||||
mysavedSystemScope = new SystemScope(mysavedSystemScopeString);
|
mySavedSystemScope = new SystemScope(mySavedSystemScopeString);
|
||||||
|
|
||||||
|
|
||||||
// two strictly default scopes (restricted)
|
// two strictly default scopes (restricted)
|
||||||
|
@ -124,7 +124,7 @@ public class TestDefaultSystemScopeService {
|
||||||
Mockito.when(repository.getByValue(restrictedScope1String)).thenReturn(restrictedScope1);
|
Mockito.when(repository.getByValue(restrictedScope1String)).thenReturn(restrictedScope1);
|
||||||
|
|
||||||
Mockito.when(repository.getAll()).thenReturn(allScopes);
|
Mockito.when(repository.getAll()).thenReturn(allScopes);
|
||||||
Mockito.when(repository.save(mySystemScope)).thenReturn(mysavedSystemScope);
|
Mockito.when(repository.save(mySystemScope)).thenReturn(mySavedSystemScope);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -240,7 +240,7 @@ public class TestDefaultSystemScopeService {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void save_value() {
|
public void save_value() {
|
||||||
assertThat(service.save(mySystemScope), equalTo(mysavedSystemScope));
|
assertThat(service.save(mySystemScope), equalTo(mySavedSystemScope));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue