Search in sources :

Example 1 with SecurityModeStoreAdapter

use of org.onosproject.security.store.SecurityModeStoreAdapter in project onos by opennetworkinglab.

the class SecurityModeManagerTest method setUp.

@Before
public void setUp() throws Exception {
    store = new SecurityModeStoreAdapter();
    appId = new DefaultApplicationId(1, "test");
    testPermissions = new HashSet<Permission>();
    testPermission = new Permission("testClass", "testNameAdmin");
    testPermissions.add(testPermission);
    testFeatures = new ArrayList<String>();
    testFeatures.add("testFeature");
    testRequiredApps = new ArrayList<String>();
    testRequiredApps.add("testRequiredApp");
    app = DefaultApplication.builder().withAppId(appId).withVersion(Version.version(1, 1, "patch", "build")).withTitle("testTitle").withDescription("testDes").withOrigin("testOri").withCategory("testCT").withUrl("testurl").withReadme("test").withIcon(null).withRole(ApplicationRole.ADMIN).withPermissions(testPermissions).withFeaturesRepo(Optional.ofNullable(null)).withFeatures(testFeatures).withRequiredApps(testRequiredApps).build();
    store.registerApplication(appId);
}
Also used : Permission(org.onosproject.security.Permission) SecurityModeStoreAdapter(org.onosproject.security.store.SecurityModeStoreAdapter) DefaultApplicationId(org.onosproject.core.DefaultApplicationId) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 DefaultApplicationId (org.onosproject.core.DefaultApplicationId)1 Permission (org.onosproject.security.Permission)1 SecurityModeStoreAdapter (org.onosproject.security.store.SecurityModeStoreAdapter)1