File tree Expand file tree Collapse file tree 5 files changed +30
-9
lines changed
main/java/dev/project516/JavaAppTemplate
test/java/dev/project516/JavaAppTemplate Expand file tree Collapse file tree 5 files changed +30
-9
lines changed Original file line number Diff line number Diff line change 3333 with :
3434 github_token : ${{ secrets.GITHUB_TOKEN }}
3535 publish_dir : ./app/build/docs/javadoc
36- force_orphan : ' true'
36+ force_orphan : ' true'
Original file line number Diff line number Diff line change 11{
22 "github.copilot.enable" : false ,
3- "java.configuration.updateBuildConfiguration" : " automatic"
3+ "java.configuration.updateBuildConfiguration" : " automatic" ,
4+ "java.compile.nullAnalysis.mode" : " automatic"
45}
Original file line number Diff line number Diff line change 1+ // SPDX-FileCopyrightText: 2026 project516 <project516@project516.dev>
2+ //
3+ // SPDX-License-Identifier: MIT
4+
5+ package dev .project516 .JavaAppTemplate ;
6+
7+ import java .util .ArrayList ;
8+ import java .util .Random ;
9+
10+ public class Greet {
11+
12+ ArrayList <String > greetingList = new ArrayList <String >();
13+
14+ Random rand = new Random ();
15+
16+ public Greet () {
17+ greetingList .add ("Hi" );
18+ greetingList .add ("Hello" );
19+ }
20+
21+ public String greetUser () {
22+ return greetingList .get (rand .nextInt (2 ));
23+ }
24+ }
Original file line number Diff line number Diff line change 66
77public class Main {
88
9- public String greetUser () {
10- return "Hello!" ;
11- }
12-
139 public static void main (String [] args ) {
1410
15- System .out .println (new Main ().greetUser ());
11+ System .out .println (new Greet ().greetUser ());
1612 }
1713}
Original file line number Diff line number Diff line change 88
99import org .junit .Test ;
1010
11- public class MainTest {
11+ public class GreetTest {
1212 @ Test
1313 public void testGreetsUser () {
14- Main classUnderTest = new Main ();
14+ Greet classUnderTest = new Greet ();
1515 assertNotNull ("Should greet the user" , classUnderTest .greetUser ());
1616 }
1717}
You can’t perform that action at this time.
0 commit comments