blob: 3cc759d32dd5cf5ecdc33963776c6609402b46b5 [file] [log] [blame]
Chanhee Lee94010482017-01-23 23:06:18 -08001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2017-present Open Networking Foundation
Chanhee Lee94010482017-01-23 23:06:18 -08003 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.security;
18
19import java.security.AccessControlException;
20
21import org.junit.Test;
22
23/**
24 * Test of AppGuard.
25 */
26public class AppGuardTest {
27
28 @Test(expected = AccessControlException.class)
29 public void testCheckPermission() throws Exception {
30 SecurityManager sm = new SecurityManager();
31 sm.checkPermission(new AppPermission((AppPermission.Type.APP_EVENT)));
32 }
33
34}