summaryrefslogtreecommitdiff
path: root/src/components/resumption/test/last_state_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/resumption/test/last_state_test.cc')
-rw-r--r--src/components/resumption/test/last_state_test.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/components/resumption/test/last_state_test.cc b/src/components/resumption/test/last_state_test.cc
index 15180fa12c..61c227bbf3 100644
--- a/src/components/resumption/test/last_state_test.cc
+++ b/src/components/resumption/test/last_state_test.cc
@@ -73,13 +73,13 @@ class LastStateTest : public ::testing::Test {
};
TEST_F(LastStateTest, Basic) {
- const Value& dictionary = last_state_.get_dictionary();
+ const Value& dictionary = last_state_.dictionary();
EXPECT_EQ(empty_dictionary_, dictionary.toStyledString());
}
TEST_F(LastStateTest, SetGetData) {
{
- Value& dictionary = last_state_.get_dictionary();
+ Value dictionary = last_state_.dictionary();
const Value& bluetooth_info =
dictionary["TransportManager"]["BluetoothAdapter"];
EXPECT_EQ(empty_dictionary_, bluetooth_info.toStyledString());
@@ -102,18 +102,19 @@ TEST_F(LastStateTest, SetGetData) {
dictionary["TransportManager"]["BluetoothAdapter"]["devices"] =
"bluetooth_device";
- last_state_.SaveStateToFileSystem();
+ last_state_.set_dictionary(dictionary);
+ last_state_.SaveToFileSystem();
}
- const Value& dictionary = last_state_.get_dictionary();
+ const Value dictionary = last_state_.dictionary();
const Value& bluetooth_info =
dictionary["TransportManager"]["BluetoothAdapter"];
const Value& tcp_adapter_info = dictionary["TransportManager"]["TcpAdapter"];
- EXPECT_EQ("{\n \"devices\" : \"bluetooth_device\"\n}\n",
+ EXPECT_EQ("{\n\t\"devices\" : \"bluetooth_device\"\n}\n",
bluetooth_info.toStyledString());
EXPECT_EQ(
- "{\n \"devices\" : {\n \"name\" : \"test_device\"\n }\n}\n",
+ "{\n\t\"devices\" : \n\t{\n\t\t\"name\" : \"test_device\"\n\t}\n}\n",
tcp_adapter_info.toStyledString());
}