EXPECT_EQ(ERROR_NONE, ret);
}
+TEST(StcManager_Restriction, RemoveRulePostWarnLimitCrossed_p)
+{
+ error_e ret = ERROR_NONE;
+ int sys_ret;
+ Restriction rest;
+
+ ret = rest.SetRule("TOTAL_WIFI",
+ "wlan0",
+ NULL,
+ IFACE_WIFI,
+ -1,
+ 1,
+ ROAMING_UNKNOWN,
+ GTEST_MAC);
+ EXPECT_EQ(ERROR_NONE, ret);
+
+ ret = rest.SetRstriction();
+ EXPECT_EQ(ERROR_NONE, ret);
+
+ sys_ret = system("toybox ping -c 5 www.tizen.org");
+ EXPECT_EQ(0, sys_ret);
+
+ ret = rest.UnsetRstriction();
+ EXPECT_EQ(ERROR_NONE, ret);
+}
+
+TEST(StcManager_Restriction, RemoveRulePostRestrictionLimitCrossed_p)
+{
+ error_e ret = ERROR_NONE;
+ int sys_ret;
+ Restriction rest;
+
+ ret = rest.SetRule("TOTAL_WIFI",
+ "wlan0",
+ NULL,
+ IFACE_WIFI,
+ 2,
+ -1,
+ ROAMING_UNKNOWN,
+ GTEST_MAC);
+ EXPECT_EQ(ERROR_NONE, ret);
+
+ ret = rest.SetRstriction();
+ EXPECT_EQ(ERROR_NONE, ret);
+
+ sys_ret = system("toybox ping -c 5 www.tizen.org");
+ EXPECT_NE(0, sys_ret);
+
+ ret = rest.UnsetRstriction();
+ EXPECT_EQ(ERROR_NONE, ret);
+}
+
+TEST(StcManager_Restriction, RemoveRulePostBothLimitCrossed_p)
+{
+ error_e ret = ERROR_NONE;
+ int sys_ret;
+ Restriction rest;
+
+ ret = rest.SetRule("TOTAL_WIFI",
+ "wlan0",
+ NULL,
+ IFACE_WIFI,
+ 2,
+ 1,
+ ROAMING_UNKNOWN,
+ GTEST_MAC);
+ EXPECT_EQ(ERROR_NONE, ret);
+
+ ret = rest.SetRstriction();
+ EXPECT_EQ(ERROR_NONE, ret);
+
+ sys_ret = system("toybox ping -c 5 www.tizen.org");
+ EXPECT_NE(0, sys_ret);
+
+ ret = rest.UnsetRstriction();
+ EXPECT_EQ(ERROR_NONE, ret);
+}
+
TEST(StcManager_Firewall, Lock_p)
{
error_e ret = ERROR_NONE;