public void Set_WhenNotFavourite_WritesToPathWithoutIdentifiers_Test() { string path; using (WriteText(out path, "RS001", "RS002")) { var favourites = new TextFavouriteManager(path); favourites.Set("rs001", false); favourites.Set("rs002", false); AssertText(path); } }
public void Set_WhenPathDoesNotExist_CreatesDirectoryAndFile_Test() { string path; using (MakeTempPath(out path)) { var favourites = new TextFavouriteManager(path); Assert.DoesNotThrow(() => favourites.Set("rs001", true)); Assert.True(File.Exists(path)); } }