-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests to reproduce issue #16: Maven plugin fails to set the classpath
- Loading branch information
Showing
4 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
end-to-end-tests/src/test/java/net/orfjackal/retrolambda/test/ClasspathTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright © 2013-2014 Esko Luontola <www.orfjackal.net> | ||
// This software is released under the Apache License 2.0. | ||
// The license text is at http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
package net.orfjackal.retrolambda.test; | ||
|
||
import org.hamcrest.*; | ||
import org.junit.Test; | ||
|
||
import java.util.Arrays; | ||
|
||
import static org.hamcrest.MatcherAssert.assertThat; | ||
import static org.hamcrest.Matchers.is; | ||
|
||
public class ClasspathTest { | ||
|
||
@Test | ||
public void maven_plugin_sets_classpath_for_main_dependencies() { | ||
assertThat(InMainSources.useLambdaOfImportedType(Arrays.asList("a", "b")), is(Arrays.asList("A", "B"))); | ||
} | ||
|
||
@Test | ||
public void maven_plugin_sets_classpath_for_test_dependencies() { | ||
SelfDescribing lambda = (desc) -> desc.appendText("foo"); | ||
|
||
StringDescription result = new StringDescription(); | ||
lambda.describeTo(result); | ||
assertThat(result.toString(), is("foo")); | ||
} | ||
} |