예제 #1
0
        public void Find_FindsGlobalJson_InCurrentDirectory()
        {
            var expected = Path.Combine(TempDirectory.Path, "global.json");

            File.WriteAllText(expected, " ");

            var actual = GlobalJsonLocator.Find(new DirectoryInfo(TempDirectory.Path));

            Assert.AreEqual(expected, actual.FullName);
        }
예제 #2
0
        public int OnExecute()
        {
            var globalJsonFile = GlobalJsonLocator.Find(new DirectoryInfo(Directory.GetCurrentDirectory()));

            if (globalJsonFile == null)
            {
            }


            return(0);
        }
예제 #3
0
        public void Find_FindsGlobalJson_InParent()
        {
            var expected = Path.Combine(TempDirectory.Path, "global.json");

            File.WriteAllText(expected, " ");

            Directory.CreateDirectory(Path.Combine(TempDirectory.Path, "foo"));
            Directory.CreateDirectory(Path.Combine(TempDirectory.Path, "foo", "bar"));

            var actual = GlobalJsonLocator.Find(new DirectoryInfo(Path.Combine(TempDirectory.Path, "foo", "bar")));

            Assert.AreEqual(expected, actual.FullName);
        }