コード例 #1
0
        public void ShouldReturnEmptyListFromEmptyStorageFile()
        {
            MRUItemFileStorage fileStorage = new MRUItemFileStorage(path);
            List <MRUItem>     items       = fileStorage.ReadMRUItems() as List <MRUItem>;

            Assert.IsNotNull(items);
            Assert.IsTrue(items.Count == 0);
        }
コード例 #2
0
        public void ShouldSaveAndReadMRUItems()
        {
            MRUItemFileStorage fileStorage = new MRUItemFileStorage(path);
            List <MRUItem>     items       = CreateItems();

            fileStorage.SaveMRUItems(items);

            List <MRUItem> readedItems = fileStorage.ReadMRUItems() as List <MRUItem>;

            Assert.IsNotNull(readedItems);
            Assert.IsTrue(readedItems.Count == 2);
            Assert.IsTrue(readedItems[0].FilePath == "path1");
            Assert.IsTrue(readedItems[0].Pinned);
        }