5050
5151import com .puppycrawl .tools .checkstyle .TreeWalker ;
5252import com .puppycrawl .tools .checkstyle .api .AuditEvent ;
53- import com .puppycrawl .tools .checkstyle .api .LocalizedMessage ;
53+ import com .puppycrawl .tools .checkstyle .api .Violation ;
5454
5555public class CheckstyleAuditListenerTest {
5656
5757 private final File file = new File ("file1" );
5858 private final AuditEvent event = new AuditEvent (this , file .getAbsolutePath (),
59- new LocalizedMessage (42 , "" , "" , null , "" , CheckstyleAuditListenerTest .class , "msg" ));
59+ new Violation (42 , "" , "" , null , "" , CheckstyleAuditListenerTest .class , "msg" ));
6060 private ActiveRules ruleFinder ;
6161 private InputFile inputFile ;
6262 private SensorContext context ;
@@ -84,14 +84,14 @@ public void before() {
8484 public void testUtilityMethods () {
8585 AuditEvent eventTest ;
8686
87- eventTest = new AuditEvent (this , "" , new LocalizedMessage (0 , "" , "" , null , "" ,
87+ eventTest = new AuditEvent (this , "" , new Violation (0 , "" , "" , null , "" ,
8888 CheckstyleAuditListenerTest .class , "msg" ));
8989 assertThat (CheckstyleAuditListener .getLineId (eventTest )).isEqualTo (1 );
9090 assertThat (CheckstyleAuditListener .getMessage (eventTest )).isEqualTo ("msg" );
9191 assertThat (CheckstyleAuditListener .getRuleKey (eventTest )).isEqualTo (
9292 CheckstyleAuditListenerTest .class .getName ());
9393
94- eventTest = new AuditEvent (this , "" , new LocalizedMessage (1 , "" , "" , null , "" ,
94+ eventTest = new AuditEvent (this , "" , new Violation (1 , "" , "" , null , "" ,
9595 CheckstyleAuditListenerTest .class , "msg" ));
9696 assertThat (CheckstyleAuditListener .getLineId (eventTest )).isEqualTo (1 );
9797 assertThat (CheckstyleAuditListener .getMessage (eventTest )).isEqualTo ("msg" );
@@ -103,7 +103,7 @@ public void testUtilityMethods() {
103103 assertThat (CheckstyleAuditListener .getMessage (eventTest )).isNull ();
104104 assertThat (CheckstyleAuditListener .getRuleKey (eventTest )).isNull ();
105105
106- eventTest = new AuditEvent (this , "" , new LocalizedMessage (0 , "" , "" , null , "module" ,
106+ eventTest = new AuditEvent (this , "" , new Violation (0 , "" , "" , null , "module" ,
107107 CheckstyleAuditListenerTest .class , "msg" ));
108108 assertThat (CheckstyleAuditListener .getLineId (eventTest )).isEqualTo (1 );
109109 assertThat (CheckstyleAuditListener .getMessage (eventTest )).isEqualTo ("msg" );
@@ -142,7 +142,7 @@ private void addErrorTestForLine(final int pLineNo) {
142142 new DefaultTextPointer (1 , 1 ), new DefaultTextPointer (1 , 2 )));
143143
144144 final AuditEvent eventAdded = new AuditEvent (this , file .getAbsolutePath (),
145- new LocalizedMessage (pLineNo , "" , "" , null , "" , CheckstyleAuditListenerTest .class ,
145+ new Violation (pLineNo , "" , "" , null , "" , CheckstyleAuditListenerTest .class ,
146146 "msg" ));
147147 addErrorToListener (eventAdded );
148148
@@ -167,7 +167,7 @@ public void addErrorOnTreeWalkerRule() {
167167 final AuditEvent treeWalkerEvent = new AuditEvent (
168168 this ,
169169 file .getAbsolutePath (),
170- new LocalizedMessage (42 , "" , "" , null , "" ,
170+ new Violation (42 , "" , "" , null , "" ,
171171 TreeWalker .class , "msg" ));
172172
173173 when (context .newIssue ()).thenReturn (null );
0 commit comments