Beispiel #1
0
        public void ParseGlobalJson()
        {
            var textWriter = new ConsoleTextWriter();
            var tool       = new GlobalJsonLocator(textWriter);
            var globalJson = tool.Parse();

            (globalJson?.Sdk?.Version ?? throw new ArgumentNullException()).ShouldBe("2.2.100");
        }
Beispiel #2
0
        public void NotifyUserGlobalJsonNotFound()
        {
            using var sw = new StringWriter();
            Console.SetOut(sw);

            var tool = new GlobalJsonLocator(new ConsoleTextWriter());

            tool.Parse();

            sw.ToString().ShouldContain("global.json could not be found in the current directory");
        }