• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Solgio / SECONDA_MTSS / #5

08 May 2025 10:43AM UTC coverage: 96.875%. First build
#5

push

Solgio
Print 3 TDD (Expected to Pass) Convert 3 implementation and Constructor Test Add #3

28 of 29 new or added lines in 2 files covered. (96.55%)

31 of 32 relevant lines covered (96.88%)

0.97 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

95.83
/roman-number/src/main/java/it/unipd/mtss/RomanPrinter.java
1
////////////////////////////////////////////////////////////////////
2
// PIETRO GIULIO BASSI 2137999
3
// LORENZO SOLIGO 2101057
4
////////////////////////////////////////////////////////////////////
5
package it.unipd.mtss;
6
public class RomanPrinter {
1✔
7
    public static String print(int num){
8
        return printAsciiArt(IntegerToRoman.convert(num));
1✔
9
    }
10
    private static String printAsciiArt(String romanNumber){
11
        StringBuilder asciiArt = new StringBuilder();
1✔
12
        switch (romanNumber) {
1✔
13
            case "I":
14
                asciiArt.append("  ___ \n");
1✔
15
                asciiArt.append(" |_ _|\n");
1✔
16
                asciiArt.append("  | | \n");
1✔
17
                asciiArt.append("  | | \n");
1✔
18
                asciiArt.append(" |___|\n");
1✔
19
                break;
1✔
20
            case "II":
21
                asciiArt.append("  ___   ___ \n");
1✔
22
                asciiArt.append(" |_ _| |_ _|\n");
1✔
23
                asciiArt.append("  | |   | | \n");
1✔
24
                asciiArt.append("  | |   | | \n");
1✔
25
                asciiArt.append(" |___| |___|\n");
1✔
26
                break;
1✔
27
            case "III":
28
                asciiArt.append("  ___   ___   ___ \n");
1✔
29
                asciiArt.append(" |_ _| |_ _| |_ _|\n");
1✔
30
                asciiArt.append("  | |   | |   | | \n");
1✔
31
                asciiArt.append("  | |   | |   | | \n");
1✔
32
                asciiArt.append(" |___| |___| |___|\n");
1✔
33
                break;
1✔
34
            default:
NEW
35
                throw new IllegalArgumentException("Invalid Roman numeral: " + romanNumber);
×
36
        }
37
        return asciiArt.toString();
1✔
38
    }
39
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc