Lines Matching refs:store

90   void ExpectPropertiesWithVersion(PropertyStore* store,  in ExpectPropertiesWithVersion()  argument
95 EXPECT_TRUE(store->GetStringProperty(property_prefix + ".Address", in ExpectPropertiesWithVersion()
99 EXPECT_TRUE(store->GetStringProperty(property_prefix + ".Gateway", in ExpectPropertiesWithVersion()
104 EXPECT_TRUE(store->GetInt32Property(property_prefix + ".Mtu", &int_value, in ExpectPropertiesWithVersion()
107 EXPECT_TRUE(store->GetStringProperty(property_prefix + ".NameServers", in ExpectPropertiesWithVersion()
113 EXPECT_TRUE(store->GetStringProperty(property_prefix + ".PeerAddress", in ExpectPropertiesWithVersion()
117 EXPECT_TRUE(store->GetInt32Property(property_prefix + ".Prefixlen", in ExpectPropertiesWithVersion()
122 void ExpectProperties(PropertyStore* store, const string& property_prefix) { in ExpectProperties() argument
123 ExpectPropertiesWithVersion(store, property_prefix, 0); in ExpectProperties()
134 void SetStaticPropertiesWithVersion(PropertyStore* store, int version) { in SetStaticPropertiesWithVersion() argument
136 store->SetStringProperty( in SetStaticPropertiesWithVersion()
138 store->SetStringProperty( in SetStaticPropertiesWithVersion()
140 store->SetInt32Property( in SetStaticPropertiesWithVersion()
142 store->SetStringProperty( in SetStaticPropertiesWithVersion()
147 store->SetStringProperty( in SetStaticPropertiesWithVersion()
151 store->SetInt32Property("StaticIP.Prefixlen", kPrefixLen + version, &error); in SetStaticPropertiesWithVersion()
153 void SetStaticProperties(PropertyStore* store) { in SetStaticProperties() argument
154 SetStaticPropertiesWithVersion(store, 0); in SetStaticProperties()
156 void SetStaticDictPropertiesWithVersion(PropertyStore* store, int version) { in SetStaticDictPropertiesWithVersion() argument
169 store->SetKeyValueStoreProperty(kStaticIPConfigProperty, args, &error); in SetStaticDictPropertiesWithVersion()
193 PropertyStore store; in TEST_F() local
194 static_params_.PlumbPropertyStore(&store); in TEST_F()
195 SetStaticProperties(&store); in TEST_F()
201 store.ClearProperty("StaticIP.Address", &unused_error); in TEST_F()
203 store.ClearProperty("StaticIP.Mtu", &unused_error); in TEST_F()
215 EXPECT_FALSE(store.GetStringProperty("StaticIP.Address", nullptr, &error)); in TEST_F()
219 EXPECT_TRUE(store.GetStringProperty("StaticIP.Gateway", &string_value, in TEST_F()
224 EXPECT_FALSE(store.GetInt32Property("StaticIP.Mtu", nullptr, &error)); in TEST_F()
227 EXPECT_TRUE(store.GetStringProperty("StaticIP.NameServers", &string_value, in TEST_F()
230 EXPECT_TRUE(store.GetStringProperty("StaticIP.PeerAddress", &string_value, in TEST_F()
234 EXPECT_TRUE(store.GetInt32Property("StaticIP.Prefixlen", &int_value, in TEST_F()
240 StrictMock<MockStore> store; in TEST_F() local
242 EXPECT_CALL(store, GetString(kID, "StaticIP.Address", _)) in TEST_F()
244 EXPECT_CALL(store, GetString(kID, "StaticIP.Gateway", _)) in TEST_F()
246 EXPECT_CALL(store, GetInt(kID, "StaticIP.Mtu", _)) in TEST_F()
248 EXPECT_CALL(store, GetString(kID, "StaticIP.NameServers", _)) in TEST_F()
251 EXPECT_CALL(store, GetString(kID, "StaticIP.PeerAddress", _)) in TEST_F()
254 EXPECT_CALL(store, GetInt(kID, "StaticIP.Prefixlen", _)) in TEST_F()
256 static_params_.Load(&store, kID); in TEST_F()
260 EXPECT_CALL(store, SetString(kID, "StaticIP.Address", kAddress)) in TEST_F()
262 EXPECT_CALL(store, SetString(kID, "StaticIP.Gateway", kGateway)) in TEST_F()
264 EXPECT_CALL(store, SetInt(kID, "StaticIP.Mtu", kMtu)) in TEST_F()
266 EXPECT_CALL(store, SetString(kID, "StaticIP.NameServers", kNameServers)) in TEST_F()
268 EXPECT_CALL(store, SetString(kID, "StaticIP.PeerAddress", kPeerAddress)) in TEST_F()
270 EXPECT_CALL(store, SetInt(kID, "StaticIP.Prefixlen", kPrefixLen)) in TEST_F()
272 static_params_.Save(&store, kID); in TEST_F()