Skip to content

Commit

Permalink
add LinkedResourcesTest
Browse files Browse the repository at this point in the history
  • Loading branch information
abc committed Nov 4, 2022
1 parent 29971c8 commit ec063ee
Showing 1 changed file with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package org.eclipse.tycho.test.linkedResources;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.hasItem;
import static org.hamcrest.Matchers.not;

import java.util.List;

import org.apache.maven.it.VerificationException;
import org.apache.maven.it.Verifier;
import org.eclipse.tycho.test.AbstractTychoIntegrationTest;
import org.junit.jupiter.api.Test;

public class LinkedResourcesTest extends AbstractTychoIntegrationTest {

@Test
public void testLinkedSettingsFolder() throws Exception {
Verifier verifier = getVerifier("linked-resources", false);
verifier.executeGoals(List.of("verify"));

verifyNoUseProjectSettingsWarning(verifier);
}

private void verifyNoUseProjectSettingsWarning(Verifier verifier) throws VerificationException {
List<String> lines = verifier.loadFile(verifier.getBasedir(), verifier.getLogFileName(), false);

String warningMsg = "[WARNING] Parameter 'useProjectSettings' is set to true, but preferences file";

assertThat(lines, not(hasItem(containsString(warningMsg))));
}
}

0 comments on commit ec063ee

Please sign in to comment.