-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
55012d4
commit 7ba6131
Showing
6 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
jans-auth-server/agama/engine/src/test/resources/libs/co/ListUtil.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,19 @@ | ||
package co; | ||
|
||
public class ListUtil { | ||
|
||
private ListUtil() {} | ||
|
||
public static Integer sum(List<Integer> list) { | ||
return list.stream().mapToInt(x -> x).sum(); | ||
} | ||
|
||
public static void ensureNotNull(List<Test> list) { | ||
Objects.requireNonNull(list); | ||
} | ||
|
||
public static void ensureArrayNotNull(Test[] arr) { | ||
Objects.requireNonNull(arr); | ||
} | ||
|
||
} |
9 changes: 9 additions & 0 deletions
9
jans-auth-server/agama/engine/src/test/resources/libs/co/MyInterface.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,9 @@ | ||
package co; | ||
|
||
public interface MyInterface { | ||
|
||
default String echo(String s) { | ||
return s; | ||
} | ||
|
||
} |
22 changes: 22 additions & 0 deletions
22
jans-auth-server/agama/engine/src/test/resources/libs/co/SubTest.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,22 @@ | ||
package co; | ||
|
||
public class SubTest extends Test { | ||
|
||
private String name; | ||
|
||
public SubTest() {} | ||
|
||
public SubTest(String id, String name) { | ||
this.id = id; | ||
this.name = name; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
jans-auth-server/agama/engine/src/test/resources/libs/co/Test.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,20 @@ | ||
package co; | ||
|
||
public class Test implements MyInterface { | ||
|
||
private String id; | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public void setId(String id) { | ||
this.id = id; | ||
} | ||
|
||
public static String sum(Test t1, Test t2) { | ||
if (t1 == null || t2 == null) return ""; | ||
return t1.getId() + t2.getId(); | ||
} | ||
|
||
} |
12 changes: 12 additions & 0 deletions
12
jans-auth-server/agama/engine/src/test/resources/libs/co/coo/Foo.groovy
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,12 @@ | ||
package co.coo | ||
|
||
class Foo { | ||
|
||
String name | ||
|
||
void bar() { | ||
//Intentionally malformed | ||
"Hello ${name} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
jans-auth-server/agama/engine/src/test/resources/libs/co/coo/Foobar.groovy
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,11 @@ | ||
package co.coo | ||
|
||
class Foobar { | ||
|
||
String sayHello() { | ||
def greet = "Hello, Groovy!" | ||
greet | ||
} | ||
|
||
} | ||
|