예제 #1
0
        public void NoArgumentsProvidedAndNoDefaultScripts()
        {
            BuildScriptLocatorException ex = Assert.Throws <BuildScriptLocatorException>(
                () =>
            {
                locator.FindBuildScript(new string[] { });
            });

            StringAssert.Contains(
                "The build script file was not specified. Please specify it as the first argument or use some of the default paths for script file: buildscript.cs",
                ex.Message);
        }
예제 #2
0
        public void BuildScriptFileNameProvidedButTheFileDoesNotExist()
        {
            const string BuildScriptFileName = "somescript.cs";

            fileExistsService.Setup(x => x.FileExists(BuildScriptFileName)).Returns(false);

            BuildScriptLocatorException ex = Assert.Throws <BuildScriptLocatorException>(
                () =>
            {
                locator.FindBuildScript(new[] { BuildScriptFileName });
            });

            StringAssert.Contains(
                "The build script file specified ('somescript.cs') does not exist.",
                ex.Message);
        }