File tree Expand file tree Collapse file tree 3 files changed +42
-4
lines changed
Expand file tree Collapse file tree 3 files changed +42
-4
lines changed Original file line number Diff line number Diff line change 1+ name : Maven CI with Java 25
2+
3+ on : [push, pull_request]
4+
5+ jobs :
6+ test :
7+ runs-on : ubuntu-latest
8+
9+ steps :
10+ - uses : actions/checkout@v5.0.1
11+
12+ - name : Set up JDK 25
13+ uses : actions/setup-java@v5.1.0
14+ with :
15+ distribution : ' azul'
16+ java-version : ' 25'
17+ cache : ' maven'
18+
19+ - name : Build with Maven and run tests
20+ run : mvn test
Original file line number Diff line number Diff line change 1+ package assignment ._01 ;
2+
3+ public class Demo
4+ {
5+ static public final String version = "v0.1.0" ;
6+ }
Original file line number Diff line number Diff line change 1717
1818@ DisableIfTestFails
1919@ TestMethodOrder (MethodOrderer .OrderAnnotation .class )
20- @ DisplayName ("Assignment Title " )
20+ @ DisplayName ("Assignments " )
2121public class TestAssignment extends BaseAssignment
2222{
23- @ DisplayName ("Assignment Task #01" )
23+ @ DisplayName ("Assignment 01 Task #01" )
2424 @ Order (1 )
2525 @ Test ()
26- public void task01 () {
27- // Code that tests the assignment goes here
26+ public void assignment01_01 () {
27+ assertTrue (classExists ("assignment._01.Demo" ));
28+ }
29+
30+ @ DisplayName ("Assignment 01 Task #02" )
31+ @ Order (1 )
32+ @ Test ()
33+ public void assignment01_02 () {
34+ testClassField ("assignment._01.Demo" , "version" , () -> {
35+ assertTrue (fieldIsStatic ());
36+ assertTrue (fieldIsPublic ());
37+ assertTrue (fieldIsFinal ());
38+ assertEquals ("String" , fieldType ());
39+ });
2840 }
2941}
You can’t perform that action at this time.
0 commit comments