private void ClearFilesAndIndex() { var files = _driver.Enum().ToArray(); foreach (var file in files.Where(x => _index.Get(new StorageItem { FileName = x }) == null)) { _driver.Remove(file); } foreach (var file in _index.Items.Where(x => !files.Contains(x.FileName)).ToArray()) { _index.Remove(file); } }
public IEnumerable <string> Enum() { return(_driver.Enum().Where(EndsWithExtention)); }
private void EnumTesting(IStorageDriver driver, IEnumerable <string> resultArray) { _baseDriver.Enum().Returns(_enumTestArray); Assert.IsTrue(driver.Enum().ScrambledEquals(resultArray)); }