Search in sources :

Example 6 with ExecutionFailure

use of org.gradle.integtests.fixtures.executer.ExecutionFailure in project gradle by gradle.

the class ProjectLoadingIntegrationTest method buildFailsWhenSpecifiedSettingsFileIsNotAFile.

@Test
public void buildFailsWhenSpecifiedSettingsFileIsNotAFile() {
    TestFile file = testFile("unknown");
    ExecutionFailure result = inTestDirectory().usingSettingsFile(file).runWithFailure();
    result.assertHasDescription("The specified settings file '" + file + "' does not exist.");
    file.createDir();
    result = inTestDirectory().usingSettingsFile(file).runWithFailure();
    result.assertHasDescription("The specified settings file '" + file + "' is not a file.");
}
Also used : TestFile(org.gradle.test.fixtures.file.TestFile) ExecutionFailure(org.gradle.integtests.fixtures.executer.ExecutionFailure) Test(org.junit.Test) AbstractIntegrationTest(org.gradle.integtests.fixtures.AbstractIntegrationTest)

Aggregations

AbstractIntegrationTest (org.gradle.integtests.fixtures.AbstractIntegrationTest)6 ExecutionFailure (org.gradle.integtests.fixtures.executer.ExecutionFailure)6 Test (org.junit.Test)6 TestFile (org.gradle.test.fixtures.file.TestFile)4