Update TestDefaultSystemScopeService.java

pull/1367/head
Aishwarya Gosavi 2018-03-04 11:49:24 -05:00 committed by GitHub
parent a7ce3eb282
commit f26f6db319
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 55 deletions

View File

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright 2017 The MIT Internet Trust Consortium
* Copyright 2018 The MIT Internet Trust Consortium
*
* Portions copyright 2011-2013 The MITRE Corporation
*
@ -184,60 +184,6 @@ public class TestDefaultSystemScopeService {
// extra scope (fail)
assertThat(service.scopesMatch(expected, actualBad), is(false));
}
@Test
public void getremoveRestrictedAndReservedScopes() {
Set<SystemScope> restrictedAndReservedScopes = Sets.newHashSet(defaultDynScope1, defaultDynScope2, dynScope1);
assertThat(service.removeRestrictedAndReservedScopes(allScopes),equalTo(restrictedAndReservedScopes));
}
@Test
public void getremoveReservedScopes() {
Set<SystemScope> removeReservedScopes = Sets.newHashSet(defaultDynScope2, defaultDynScope1, defaultScope2,restrictedScope1,defaultScope1,dynScope1);
assertThat(service.removeReservedScopes(allScopes), equalTo(removeReservedScopes));
}
@Test
public void getById_notfound() {
// check null condition
assertThat(service.getById((long) 60), is(nullValue()));
}
@Test
public void getByValue_notfound() {
// check null condition
assertThat(service.getByValue("defaultDynScope1String"), is(nullValue()));
}
@Test
public void save_null() {
// check null condition
assertThat(service.save(defaultScope1), is(nullValue()));
}
@Test
public void save_value(){
assertThat(service.save(mySystemScope), equalTo(mySystemScope))
}
@Test
public void getReserveScopes() {
assertThat(service.getReserved(), equalTo(SystemScopeService.reservedScopes));
}
}