1 /* *****************************************************************
3 * Copyright 2015 Samsung Electronics All Rights Reserved.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
19 * *****************************************************************/
21 #include "gtest/gtest.h"
23 #include "provisioningmanager.h"
26 static OicSecAcl_t acl;
27 SPTargetDeviceInfo_t list;
28 SPTargetDeviceInfo_t *ptr = &list;
30 TEST(SPProvisioningDiscoveryTest, NotNullList)
32 EXPECT_EQ(SP_RESULT_INVALID_PARAM, SPProvisioningDiscovery(0, &ptr));
35 TEST(SPInitProvisionContextTest, NullDeviceInfo)
37 EXPECT_EQ(SP_RESULT_INVALID_PARAM, SPInitProvisionContext(0, NULL));
40 TEST(SPProvisionACLTest, NullDeviceInfo)
42 EXPECT_EQ(SP_RESULT_INVALID_PARAM, SPProvisionACL(0, NULL, &acl));
45 TEST(SPFinalizeProvisioningTest, NullDeviceInfo)
47 EXPECT_EQ(SP_RESULT_INVALID_PARAM, SPFinalizeProvisioning(0, NULL));
50 TEST(SPTerminateProvisioningTest, ValidCase)
52 EXPECT_EQ(SP_RESULT_SUCCESS, SPTerminateProvisioning());
55 TEST(SPProvisionCredentialsTest, NullList)
57 EXPECT_EQ(SP_RESULT_INVALID_PARAM, SPProvisionCredentials(0, 0, NULL));