Skip to content

Commit 2ff9692

Browse files
feat:created a file for AuditlogTest, and did spotlessapply on AuditLog
1 parent 754cfcf commit 2ff9692

File tree

2 files changed

+31
-34
lines changed

2 files changed

+31
-34
lines changed

lesson_17/bank/bank_app/src/main/java/com/codedifferently/lesson17/bank/AuditLog.java

Lines changed: 28 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,37 @@
33
import java.util.ArrayList;
44

55
public class AuditLog {
6-
private ArrayList<String> log;
6+
private ArrayList<String> log;
77

8-
/**
9-
* Constructor that creates a new AuditLog
10-
*
11-
*/
12-
public AuditLog(){
13-
this.log = new ArrayList<>();
14-
}
8+
/** Constructor that creates a new AuditLog */
9+
public AuditLog() {
10+
this.log = new ArrayList<>();
11+
}
1512

16-
17-
/**
18-
* This adds audit entry to the log
19-
*
20-
* @param audit The audit entry to add to the log
21-
*/
22-
public void addToList(String audit){
23-
log.add(audit);
24-
}
13+
/**
14+
* This adds audit entry to the log
15+
*
16+
* @param audit The audit entry to add to the log
17+
*/
18+
public void addToList(String audit) {
19+
log.add(audit);
20+
}
2521

26-
/**
27-
* Gets a copy of all audit log entries
28-
*
29-
* @return A list of all audit log entries
30-
*/
31-
public ArrayList<String> getLogEntries(){
32-
return new ArrayList<>(log);
33-
}
22+
/**
23+
* Gets a copy of all audit log entries
24+
*
25+
* @return A list of all audit log entries
26+
*/
27+
public ArrayList<String> getLogEntries() {
28+
return new ArrayList<>(log);
29+
}
3430

35-
/**
36-
* Gets the number of entries in the audit log
37-
*
38-
* @return The number of audit log entries
39-
*/
40-
public int getLogSize(){
31+
/**
32+
* Gets the number of entries in the audit log
33+
*
34+
* @return The number of audit log entries
35+
*/
36+
public int getLogSize() {
4137
return log.size();
42-
}
43-
44-
38+
}
4539
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package com.codedifferently.lesson17.bank;
2+
3+
public class AuditLogTest {}

0 commit comments

Comments
 (0)