File tree Expand file tree Collapse file tree
src/test/java/in/rsh/scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5757 <version >3.0.0</version >
5858 </dependency >
5959
60+ <!-- Imported directly in Main/K8sScript; declared explicitly (also pulled in via retrofit) -->
6061 <dependency >
61- <groupId >com.google.guava</groupId >
62- <artifactId >guava</artifactId >
63- <version >33.6.0-jre</version >
64- </dependency >
65-
66- <dependency >
67- <artifactId >commons-lang3</artifactId >
68- <groupId >org.apache.commons</groupId >
69- <version >3.20.0</version >
62+ <groupId >com.squareup.okhttp3</groupId >
63+ <artifactId >okhttp</artifactId >
64+ <version >4.12.0</version >
7065 </dependency >
7166
7267 <dependency >
7570 <version >2.15.1</version >
7671 <scope >compile</scope >
7772 </dependency >
73+
74+ <!-- Required at runtime by commons-configuration2 (declared optional upstream) -->
75+ <dependency >
76+ <groupId >commons-beanutils</groupId >
77+ <artifactId >commons-beanutils</artifactId >
78+ <version >1.11.0</version >
79+ </dependency >
7880
7981 <dependency >
8082 <artifactId >junit-jupiter</artifactId >
8890 <artifactId >client-java</artifactId >
8991 <version >27.0.0</version >
9092 </dependency >
91- <dependency >
92- <groupId >com.google.code.gson</groupId >
93- <artifactId >gson</artifactId >
94- <version >2.14.0</version >
95- </dependency >
9693 </dependencies >
9794</project >
Original file line number Diff line number Diff line change 1+ package in .rsh .scripts ;
2+
3+ import static org .junit .jupiter .api .Assertions .assertNotNull ;
4+ import static org .junit .jupiter .api .Assertions .assertSame ;
5+
6+ import com .google .inject .Injector ;
7+ import org .junit .jupiter .api .Test ;
8+
9+ class MainTest {
10+
11+ @ Test
12+ void injectorIsCreated () {
13+ Injector injector = Main .getInjector ();
14+ assertNotNull (injector , "Guice injector should be created" );
15+ }
16+
17+ @ Test
18+ void injectorIsSingleton () {
19+ assertSame (
20+ Main .getInjector (),
21+ Main .getInjector (),
22+ "getInjector() should return the same cached instance" );
23+ }
24+ }
You can’t perform that action at this time.
0 commit comments