#[test]
fn sample_string() {
use anor_storage::storage::{storage_item::*, Storage};
let key = "my_string";
let sample_string = String::from("abc");
{
let storage = Storage::open();
let storage_item = StorageItem::new(key, &sample_string).unwrap();
storage.insert(storage_item);
let mut string_value: String = storage.get_inner_object(key).unwrap();
assert_eq!(string_value, sample_string);
string_value += "def";
storage.update_inner_object(key, &string_value);
}
let storage_loaded = Storage::open();
let loaded_value = storage_loaded.get_inner_object::<String>(key).unwrap();
assert_eq!(loaded_value, "abcdef");
}