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); }
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); }