--- /dev/null
+<container>
+ <bundle>
+ <id>oic.bundle.discomfortIndexSensor</id>
+ <path>/data/local/tmp/org.iotivity.service.sample.resourcecontainer.test/files/libSoftSensorBundle.so</path>
+ <activator>disensor</activator>
+ <version>1.0.0</version>
+ <resources>
+ <resourceInfo>
+ <name>DiscomfortIndexSensor1</name>
+ <resourceType>oic.r.sensor</resourceType>
+ <outputs>
+ <output>
+ <name>discomfortIndex</name>
+ <type>int</type>
+ </output>
+ <output>
+ <name>humidity</name>
+ <type>double</type>
+ </output>
+ <output>
+ <name>temperature</name>
+ <type>double</type>
+ </output>
+ </outputs>
+ <inputs>
+ <input>
+ <name>humidity</name>
+ <type>double</type>
+ <resourceType>oic.r.humidity</resourceType>
+ </input>
+ <input>
+ <name>temperature</name>
+ <type>double</type>
+ <resourceType>oic.r.temperature</resourceType>
+ </input>
+ </inputs>
+ </resourceInfo>
+ </resources>
+ </bundle>
+ <!--
+ <bundle>
+ <id>oic.android.sample</id>
+ <path>org.iotivity.service.sample.androidbundle.apk</path>
+ <activator>org.iotivity.service.sample.androidbundle.SampleActivator</activator>
+ <version>1.0.0</version>
+ <resources>
+ <resourceInfo>
+ <name>LightResource1</name>
+ <resourceType>oic.r.light</resourceType>
+ <resourceUri>/android/light/1</resourceUri>
+ </resourceInfo>
+ <resourceInfo>
+ <name>LightIntensity1</name>
+ <resourceType>oic.r.lightintensity</resourceType>
+ <resourceUri>/android/lightintensity/1</resourceUri>
+ </resourceInfo>
+ <resourceInfo>
+ <name>Humidity1</name>
+ <resogitkurceType>oic.r.humidity</resogitkurceType>
+ <resourceUri>/android/humidity/1</resourceUri>
+ </resourceInfo>
+ <resourceInfo>
+ <name>Tepmerature1</name>
+ <resourceType>oic.r.temperature</resourceType>
+ <resourceUri>/android/temperature/1</resourceUri>
+ </resourceInfo>
+ <resourceInfo>
+ <name>Gyroscope1</name>
+ <resourceType>oic.r.gyroscope</resourceType>
+ <resourceUri>/android/gyroscope/1</resourceUri>
+ </resourceInfo>
+ <resourceInfo>
+ <name>DiscomfortIndexSensor1</name>
+ <resourceType>oic.r.discomfortindex</resourceType>
+ <resourceUri>/android/discomfortindex/1</resourceUri>
+ <outputs>
+ <output>
+ <name>discomfortIndex</name>
+ <type>int</type>
+ </output>
+ <output>
+ <name>humidity</name>
+ <type>double</type>
+ </output>
+ <output>
+ <name>temperature</name>
+ <type>double</type>
+ </output>
+ </outputs>
+ <inputs>
+ <input>
+ <name>humidity</name>
+ <type>double</type>
+ <resourceType>oic.r.humidity</resourceType>
+ </input>
+ <input>
+ <name>temperature</name>
+ <type>double</type>
+ <resourceType>oic.r.temperature</resourceType>
+ </input>
+ </inputs>
+ </resourceInfo>
+ </resources>
+ </bundle>-->
+</container>
\ No newline at end of file
--- /dev/null
+/******************************************************************
+ *
+ * Copyright 2015 Samsung Electronics All Rights Reserved.
+ *
+ *
+ *
+ * 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.iotivity.service.sample.container;
+
+import android.test.InstrumentationTestCase;
+import android.util.Log;
+
+import org.iotivity.service.resourcecontainer.RcsResourceContainer;
+
+import java.util.HashMap;
+
+public class ResourceContainerTest extends InstrumentationTestCase {
+ private RcsResourceContainer resourceContainerInstance;
+ private final String sdCardDir =
+ "/data/local/tmp/org.iotivity.service.sample.resourcecontainer.test/files/";
+
+ @Override
+ public void setUp(){
+ resourceContainerInstance = new RcsResourceContainer(getInstrumentation().getContext());
+ }
+
+ public void testStartContainer() {
+ resourceContainerInstance.startContainer("");
+ assertTrue(resourceContainerInstance.listBundles().size() == 0);
+ resourceContainerInstance.stopContainer();
+ }
+
+ public void testAddConfig(){
+ resourceContainerInstance.startContainer("");
+ //resourceContainerInstance.addBundle("");
+ assertTrue(resourceContainerInstance.listBundles().size() == 0);
+ resourceContainerInstance.stopContainer();
+ }
+
+ public void testStartBundle(){
+ resourceContainerInstance.startBundle("not.existing");
+ assertEquals(0, resourceContainerInstance.listBundles().size());
+ }
+
+ public void testStopBundle(){
+ resourceContainerInstance.startBundle("not.existing");
+ assertEquals(0, resourceContainerInstance.listBundles().size());
+ }
+
+ public void testAddBundle(){
+ resourceContainerInstance.startContainer(
+ "");
+
+ resourceContainerInstance.addBundle("oic.bundle.test", "",
+ sdCardDir + "libSoftSensorBundle.so",
+ "disensor", new HashMap<String, String>());
+ resourceContainerInstance.startBundle("oic.bundle.test");
+ resourceContainerInstance.stopContainer();
+ }
+}
\ No newline at end of file