Exemplo n.º 1
0
 public void LoadFromLocalStorageTest()
 {
     TypedHistoryManager target = new TypedHistoryManager(); // TODO: 適切な値に初期化してください
       string storagePath = string.Empty; // TODO: 適切な値に初期化してください
       int expected = -1;
       int actual;
       actual = target.LoadFromLocalStorage(storagePath);
       Assert.AreEqual(expected, actual);
 }
Exemplo n.º 2
0
 public void FromOperaLinkXmlTest()
 {
     TypedHistoryManager target = new TypedHistoryManager();
       string xmlString = "<o>"
     + "<typed_history status=\"added\" content=\"&quot;foo bar &amp;'()*&lt;>\" type=\"text\">"
     + "<last_typed>2010-04-14T18:50:18Z</last_typed></typed_history>"
     + "<typed_history status=\"added\" content=\"あ\" type=\"text\"><last_typed>2010-04-14T18:51:25Z</last_typed></typed_history>"
     + "<typed_history status=\"added\" content=\"あ\" type=\"text\"><last_typed>2010-04-14T18:51:25Z</last_typed></typed_history>"
     + "</o>";
       target.FromOperaLinkXml(xmlString);
       Assert.AreEqual(2, target.Items.Count());
       xmlString = "<o>"
     + "<typed_history status=\"deleted\" content=\"あ\" type=\"text\" />"
     + "</o>";
       target.FromOperaLinkXml(xmlString);
       Assert.AreEqual(1, target.Items.Count());
 }
Exemplo n.º 3
0
 public Client(OperaLink.Configs conf)
 {
     conf_ = conf;
       typeds_ = new TypedHistoryManager();
       ses_ = new SearchEngineManager();
       sds_ = new SpeedDialManager();
       notes_ = new NoteManager();
       bms_ = new BookmarkManager();
       xml_settings_ = new XmlWriterSettings
       {
     Encoding = System.Text.Encoding.UTF8,
     NewLineOnAttributes = false,
       };
       sync_state_ = 0;
       short_interval_ = 60;
       long_interval_ = 120;
       token_ = "";
       LastStatus = "";
       enc_ = Encoding.GetEncoding("utf-8");
 }
Exemplo n.º 4
0
 public void TypedHistoryManagerConstructorTest()
 {
     TypedHistoryManager target = new TypedHistoryManager();
       Assert.AreEqual(0, target.Items.Count());
 }
Exemplo n.º 5
0
 public void SaveToLocalStorageTest()
 {
     TypedHistoryManager target = new TypedHistoryManager(); // TODO: 適切な値に初期化してください
       string storagePath = string.Empty; // TODO: 適切な値に初期化してください
       bool expected = false; // TODO: 適切な値に初期化してください
       bool actual;
       actual = target.SaveToLocalStorage(storagePath);
       Assert.AreEqual(expected, actual);
 }