Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
        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));
            }
        }