Ejemplo n.º 1
0
        public void Test_VersionChecker_ReturnsErrorMessageWhenFileNotFound()
        {
            // can't confirm what version to test platform has
            string output = VersionChecker.GetConsoleOutput("noSuchFile.exe --version");

            Assert.AreEqual("file not found", output);
        }
Ejemplo n.º 2
0
        public void Test_VersionChecker_DoesNotCrashOrReturnNull()
        {
            // can't confirm what version to test platform has
            string output = VersionChecker.GetConsoleOutput("dotnet --version");

            Console.WriteLine(output);
            Assert.NotNull(output);
        }
Ejemplo n.º 3
0
        public void Test_VersionChecker_OutputIsVersionFormat()
        {
            // can't confirm what version to test platform has
            string  output = VersionChecker.GetConsoleOutput("dotnet --version");
            Version ver    = new Version(output);

            Console.WriteLine(ver);
            Assert.NotNull(ver);
        }