Ram Gandikota / Mbed OS ABCD
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers m2mbasetest.cpp Source File

m2mbasetest.cpp

00001 /*
00002  * Copyright (c) 2015 ARM Limited. All rights reserved.
00003  * SPDX-License-Identifier: Apache-2.0
00004  * Licensed under the Apache License, Version 2.0 (the License); you may
00005  * not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  * http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an AS IS BASIS, WITHOUT
00012  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 //CppUTest includes should be after your and system includes
00017 #include "CppUTest/TestHarness.h"
00018 #include "test_m2mbase.h"
00019 
00020 TEST_GROUP(M2MBase)
00021 {
00022     Test_M2MBase* m2m_base;
00023     Handler *obsHandler;
00024     void setup() {
00025         // Path ownership moved to m2mbase
00026         char* path = (char*)malloc(5);
00027         strcpy(path, "test");
00028 
00029         obsHandler = new Handler();
00030         m2m_base = new Test_M2MBase(path, obsHandler);
00031     }
00032 
00033     void teardown() {
00034         delete m2m_base;
00035         delete obsHandler;
00036     }
00037 };
00038 
00039 TEST(M2MBase, Create)
00040 {
00041     CHECK(m2m_base != NULL);
00042 }
00043 
00044 TEST(M2MBase, set_operation)
00045 {
00046     m2m_base->test_set_operation();
00047 }
00048 
00049 TEST(M2MBase, test_set_base_type)
00050 {
00051     m2m_base->test_set_base_type();
00052 }
00053 
00054 TEST(M2MBase, set_interface_description)
00055 {
00056     m2m_base->test_set_interface_description();
00057 }
00058 
00059 TEST(M2MBase, uri_path)
00060 {
00061     m2m_base->test_uri_path();
00062 }
00063 
00064 TEST(M2MBase, set_resource_type)
00065 {
00066     m2m_base->test_set_resource_type();
00067 }
00068 
00069 TEST(M2MBase, set_coap_content_type)
00070 {
00071     m2m_base->test_set_coap_content_type();
00072 }
00073 
00074 TEST(M2MBase, set_instance_id)
00075 {
00076     m2m_base->test_set_instance_id();
00077 }
00078 
00079 TEST(M2MBase, observation_number)
00080 {
00081     m2m_base->test_observation_number();
00082 }
00083 
00084 TEST(M2MBase, mode)
00085 {
00086     m2m_base->test_mode();
00087 }
00088 
00089 TEST(M2MBase, observation_token)
00090 {
00091     m2m_base->test_get_observation_token();
00092 }
00093 
00094 TEST(M2MBase, observation_level)
00095 {
00096     m2m_base->test_observation_level();
00097 }
00098 
00099 TEST(M2MBase, set_observation_token)
00100 {
00101     m2m_base->test_set_observation_token();
00102 }
00103 
00104 TEST(M2MBase, set_under_observation)
00105 {
00106     m2m_base->test_set_under_observation();
00107 }
00108 
00109 TEST(M2MBase, set_observable)
00110 {
00111     m2m_base->test_set_observable();
00112 }
00113 
00114 TEST(M2MBase, add_observation_level)
00115 {
00116     m2m_base->test_add_observation_level();
00117 }
00118 
00119 TEST(M2MBase, remove_observation_level)
00120 {
00121     m2m_base->test_remove_observation_level();
00122 }
00123 
00124 TEST(M2MBase, name)
00125 {
00126     m2m_base->test_name();
00127 }
00128 
00129 TEST(M2MBase, name_id)
00130 {
00131     m2m_base->test_name_id();
00132 }
00133 
00134 TEST(M2MBase, test_handle_observation_attribute)
00135 {
00136     m2m_base->test_handle_observation_attribute();
00137 }
00138 
00139 TEST(M2MBase, test_observation_to_be_sent)
00140 {
00141     m2m_base->test_observation_to_be_sent();
00142 }
00143 
00144 TEST(M2MBase, test_handle_get_request)
00145 {
00146     m2m_base->test_handle_get_request();
00147 }
00148 
00149 TEST(M2MBase, test_handle_put_request)
00150 {
00151     m2m_base->test_handle_put_request();
00152 }
00153 
00154 TEST(M2MBase, test_handle_post_request)
00155 {
00156     m2m_base->test_handle_post_request();
00157 }
00158 
00159 TEST(M2MBase, test_memory_alloc)
00160 {
00161     m2m_base->test_memory_alloc();
00162 }
00163 
00164 TEST(M2MBase, test_memory_free)
00165 {
00166     m2m_base->test_memory_free();
00167 }
00168 
00169 TEST(M2MBase, test_report_handler)
00170 {
00171     m2m_base->test_report_handler();
00172 }
00173 
00174 TEST(M2MBase, test_observation_handler)
00175 {
00176     m2m_base->test_observation_handler();
00177 }
00178 
00179 TEST(M2MBase, test_id_number)
00180 {
00181     m2m_base->test_id_number();
00182 }
00183 
00184 TEST(M2MBase, test_set_register_uri)
00185 {
00186     m2m_base->test_set_register_uri();
00187 }
00188 
00189 TEST(M2MBase, test_set_observation_number)
00190 {
00191     m2m_base->test_set_observation_number();
00192 }
00193 
00194 TEST(M2MBase, test_set_max_age)
00195 {
00196     m2m_base->test_set_max_age();
00197 }
00198 
00199 TEST(M2MBase, test_is_under_observation)
00200 {
00201     m2m_base->test_is_under_observation();
00202 }
00203 
00204 TEST(M2MBase, test_value_updated_function)
00205 {
00206     m2m_base->test_value_updated_function();
00207 }
00208 
00209 TEST(M2MBase, test_build_path)
00210 {
00211     m2m_base->test_build_path();
00212 }
00213 
00214 TEST(M2MBase, test_set_observation_handler)
00215 {
00216     m2m_base->test_set_observation_handler();
00217 }
00218 
00219 TEST(M2MBase, test_resource_type)
00220 {
00221     m2m_base->test_resource_type();
00222 }
00223 
00224 TEST(M2MBase, test_resource_name_length)
00225 {
00226     m2m_base->test_resource_name_length();
00227 }
00228 
00229 TEST(M2MBase, test_get_nsdl_resource)
00230 {
00231     m2m_base->test_get_nsdl_resource();
00232 }
00233 
00234 TEST(M2MBase, test_create_path)
00235 {
00236     m2m_base->test_create_path();
00237 }
00238 
00239 TEST(M2MBase, test_create_report_handler)
00240 {
00241     m2m_base->test_create_report_handler();
00242 }
00243 
00244 TEST(M2MBase, test_validate_string_length)
00245 {
00246     m2m_base->test_validate_string_length();
00247 }
00248 
00249 TEST(M2MBase, test_is_integer)
00250 {
00251     m2m_base->test_is_integer();
00252 }
00253 
00254 TEST(M2MBase, test_alloc_string_copy)
00255 {
00256     m2m_base->test_alloc_string_copy();
00257 }
00258 
00259 TEST(M2MBase, test_alloc_copy)
00260 {
00261     m2m_base->test_alloc_copy();
00262 }
00263 
00264 TEST(M2MBase, test_ctor)
00265 {
00266     m2m_base->test_ctor();
00267 }