public void TestGetCachePath() { string path = PathHandling.GetCachePath(); Assert.IsNotNull(path, "Cache Path is null"); Assert.IsTrue(path.Contains("C:\\"), "Cache path is not on C"); Assert.IsTrue(path.Contains("WallpaperWeather\\Cache"), "Cache path final folder is wrong"); }
public void TestDeleteFile() { string root = PathHandling.GetCachePath(); string file = Path.Combine(root, "testfile.png"); FileStream f = File.Create(file); f.Close(); Assert.IsTrue(File.Exists(file), "Test Method failed"); PathHandling.DeleteFile(file); Assert.IsFalse(File.Exists(file), "File delete failed"); }