File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
src/test/java/com/thealgorithms/strings Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ package com .thealgorithms .strings ;
2+
3+ import org .junit .jupiter .api .Test ;
4+
5+ import static org .junit .jupiter .api .Assertions .*;
6+
7+
8+ public class PangramTest {
9+ @ Test
10+ public void isPangram () {
11+ String fullAlphabet = "abcdefghijklmnopqrstuvwxyz" ;
12+ String notFullAlphabet = "abcdefghiklmnopqrstuvwxyz" ;
13+ String fullMixedCaseAlphabet = "a BCDE fghIjkLMnop qrSTuv WXYz" ;
14+ String sentence1 = "The quick brown fox jumps over the lazy dog" ;
15+ String sentence2 = "The quick brown fox jumps over the lazy gentleman" ; // missing letter d
16+
17+ assertTrue (Pangram .isPangram (fullAlphabet ));
18+ assertFalse (Pangram .isPangram (notFullAlphabet ));
19+ assertTrue (Pangram .isPangram (fullMixedCaseAlphabet ));
20+ assertTrue (Pangram .isPangram (sentence1 ));
21+ assertFalse (Pangram .isPangram (sentence2 ));
22+
23+ }
24+ }
You can’t perform that action at this time.
0 commit comments