File tree Expand file tree Collapse file tree
src/test/java/io/apimatic/coreinterfaces/security Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4545 <artifactId >slf4j-api</artifactId >
4646 <version >2.0.10</version >
4747 </dependency >
48- </dependencies >
48+ <dependency >
49+ <groupId >junit</groupId >
50+ <artifactId >junit</artifactId >
51+ <version >4.13.1</version >
52+ <scope >test</scope >
53+ </dependency >
54+ </dependencies >
4955
5056 <build >
5157 <pluginManagement >
Original file line number Diff line number Diff line change 1+ package io .apimatic .coreinterfaces .security ;
2+
3+ import org .junit .Test ;
4+
5+ import static org .junit .Assert .*;
6+
7+ public class VerificationResultTest {
8+
9+ @ Test
10+ public void testSuccess () {
11+ VerificationResult result = VerificationResult .success ();
12+ assertTrue (result .isSuccess ());
13+ assertTrue (result .getErrors ().isEmpty ());
14+ }
15+
16+ @ Test
17+ public void testFailure () {
18+ VerificationResult result = VerificationResult .failure ("Error" );
19+ assertFalse (result .isSuccess ());
20+ assertEquals (1 , result .getErrors ().size ());
21+ assertEquals ("Error" , result .getErrors ().get (0 ));
22+ }
23+ }
You can’t perform that action at this time.
0 commit comments