コード例 #1
0
        public void Test_EditEntryUrl_EntryRecord()
        {
            EntryRecord  h = new EntryRecord("Test", CompareBy.AlphabetTitle, false);
            EntryElement e = new EntryElement("http://www.duckduckgo.com", "DuckDuckGo", CompareBy.AlphabetTitle);

            h.AddEntry(e, false);
            Assert.AreEqual(h.GetUrl("DuckDuckGo"), "http://www.duckduckgo.com", "Expected and Actual URL mismatch");

            h.EditEntryUrl("DuckDuckGo", "http://www.google.com", false);
            Assert.AreEqual(h.GetUrl("DuckDuckGo"), "http://www.google.com", "Expected and Actual URL mismatch");
        }
コード例 #2
0
        public void Test_EditEntryUrlException_EntryRecord()
        {
            EntryRecord h = new EntryRecord("Test", CompareBy.AlphabetTitle, false);

            Assert.ThrowsException <System.ArgumentOutOfRangeException>(() => h.EditEntryUrl("DuckDuckGo", "http://www.google.com", false));
        }