summaryrefslogtreecommitdiffstats
path: root/framework/src/onos/core/api/src/test/java/org/onosproject/core
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/onos/core/api/src/test/java/org/onosproject/core')
-rw-r--r--framework/src/onos/core/api/src/test/java/org/onosproject/core/ApplicationIdStoreAdapter.java43
-rw-r--r--framework/src/onos/core/api/src/test/java/org/onosproject/core/CoreServiceAdapter.java59
-rw-r--r--framework/src/onos/core/api/src/test/java/org/onosproject/core/DefaultApplicationTest.java64
-rw-r--r--framework/src/onos/core/api/src/test/java/org/onosproject/core/DefaultGroupIdTest.java41
-rw-r--r--framework/src/onos/core/api/src/test/java/org/onosproject/core/UnavailableIdExceptionTest.java36
5 files changed, 0 insertions, 243 deletions
diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/core/ApplicationIdStoreAdapter.java b/framework/src/onos/core/api/src/test/java/org/onosproject/core/ApplicationIdStoreAdapter.java
deleted file mode 100644
index c3d0f237..00000000
--- a/framework/src/onos/core/api/src/test/java/org/onosproject/core/ApplicationIdStoreAdapter.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2015 Open Networking Laboratory
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.onosproject.core;
-
-import java.util.Set;
-
-/**
- * Adapter for testing against app id store.
- */
-public class ApplicationIdStoreAdapter implements ApplicationIdStore {
- @Override
- public Set<ApplicationId> getAppIds() {
- return null;
- }
-
- @Override
- public ApplicationId getAppId(Short id) {
- return null;
- }
-
- @Override
- public ApplicationId getAppId(String name) {
- return null;
- }
-
- @Override
- public ApplicationId registerApplication(String identifier) {
- return null;
- }
-}
diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/core/CoreServiceAdapter.java b/framework/src/onos/core/api/src/test/java/org/onosproject/core/CoreServiceAdapter.java
deleted file mode 100644
index 6d45e8c5..00000000
--- a/framework/src/onos/core/api/src/test/java/org/onosproject/core/CoreServiceAdapter.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2015 Open Networking Laboratory
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.onosproject.core;
-
-import java.util.Set;
-
-/**
- * Test adapter for core service.
- */
-public class CoreServiceAdapter implements CoreService {
- @Override
- public Version version() {
- return null;
- }
-
- @Override
- public Set<ApplicationId> getAppIds() {
- return null;
- }
-
- @Override
- public ApplicationId getAppId(Short id) {
- return null;
- }
-
- @Override
- public ApplicationId getAppId(String name) {
- return null;
- }
-
- @Override
- public ApplicationId registerApplication(String name) {
- return null;
- }
-
- @Override
- public ApplicationId registerApplication(String name, Runnable preDeactivate) {
- return null;
- }
-
- @Override
- public IdGenerator getIdGenerator(String topic) {
- return null;
- }
-}
diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/core/DefaultApplicationTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/core/DefaultApplicationTest.java
deleted file mode 100644
index 77b3812b..00000000
--- a/framework/src/onos/core/api/src/test/java/org/onosproject/core/DefaultApplicationTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright 2015 Open Networking Laboratory
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.onosproject.core;
-
-import com.google.common.testing.EqualsTester;
-import org.junit.Test;
-
-import java.util.Optional;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.onosproject.app.DefaultApplicationDescriptionTest.*;
-
-/**
- * Basic tests of the default app descriptor.
- */
-public class DefaultApplicationTest {
-
- public static final ApplicationId APP_ID = new DefaultApplicationId(2, APP_NAME);
-
- @Test
- public void basics() {
- Application app = new DefaultApplication(APP_ID, VER, DESC, ORIGIN, ROLE,
- PERMS, Optional.of(FURL), FEATURES, APPS);
- assertEquals("incorrect id", APP_ID, app.id());
- assertEquals("incorrect version", VER, app.version());
- assertEquals("incorrect description", DESC, app.description());
- assertEquals("incorrect origin", ORIGIN, app.origin());
- assertEquals("incorrect role", ROLE, app.role());
- assertEquals("incorrect permissions", PERMS, app.permissions());
- assertEquals("incorrect features repo", FURL, app.featuresRepo().get());
- assertEquals("incorrect features", FEATURES, app.features());
- assertEquals("incorrect apps", APPS, app.requiredApps());
- assertTrue("incorrect toString", app.toString().contains(APP_NAME));
- }
-
- @Test
- public void testEquality() {
- Application a1 = new DefaultApplication(APP_ID, VER, DESC, ORIGIN, ROLE,
- PERMS, Optional.of(FURL), FEATURES, APPS);
- Application a2 = new DefaultApplication(APP_ID, VER, DESC, ORIGIN, ROLE,
- PERMS, Optional.of(FURL), FEATURES, APPS);
- Application a3 = new DefaultApplication(APP_ID, VER, DESC, ORIGIN, ROLE,
- PERMS, Optional.empty(), FEATURES, APPS);
- Application a4 = new DefaultApplication(APP_ID, VER, DESC, ORIGIN + "asd", ROLE,
- PERMS, Optional.of(FURL), FEATURES, APPS);
- new EqualsTester().addEqualityGroup(a1, a2)
- .addEqualityGroup(a3).addEqualityGroup(a4).testEquals();
- }
-
-} \ No newline at end of file
diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/core/DefaultGroupIdTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/core/DefaultGroupIdTest.java
deleted file mode 100644
index 21dea86b..00000000
--- a/framework/src/onos/core/api/src/test/java/org/onosproject/core/DefaultGroupIdTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2014 Open Networking Laboratory
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.onosproject.core;
-
-import com.google.common.testing.EqualsTester;
-import org.junit.Test;
-
-/**
- * Test for DefaultGroupId.
- */
-public class DefaultGroupIdTest {
-
- /**
- * Tests the equality of the instances.
- */
- @Test
- public void testEquality() {
- DefaultGroupId id1 = new DefaultGroupId((short) 1);
- DefaultGroupId id2 = new DefaultGroupId((short) 1);
- DefaultGroupId id3 = new DefaultGroupId((short) 2);
-
- new EqualsTester()
- .addEqualityGroup(id1, id2)
- .addEqualityGroup(id3)
- .testEquals();
- }
-
-}
diff --git a/framework/src/onos/core/api/src/test/java/org/onosproject/core/UnavailableIdExceptionTest.java b/framework/src/onos/core/api/src/test/java/org/onosproject/core/UnavailableIdExceptionTest.java
deleted file mode 100644
index ac565d80..00000000
--- a/framework/src/onos/core/api/src/test/java/org/onosproject/core/UnavailableIdExceptionTest.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2015 Open Networking Laboratory
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.onosproject.core;
-
-import org.onlab.junit.ExceptionTest;
-
-public class UnavailableIdExceptionTest extends ExceptionTest {
-
- @Override
- protected Exception getDefault() {
- return new UnavailableIdException();
- }
-
- @Override
- protected Exception getWithMessage() {
- return new UnavailableIdException(MESSAGE);
- }
-
- @Override
- protected Exception getWithMessageAndCause() {
- return new UnavailableIdException(MESSAGE, CAUSE);
- }
-} \ No newline at end of file