Revision 0:e76872ad5226, 0.9 KB
(checked in by František Kučera <franta-hg@…>, 15 years ago)
|
Přidání SuperPošťáka? do Mercurialu (původně byl v Subversionu)
Postak – základ, knihovna
SuperPostak? – GUI nadstavba
SuperPostak?2 – pokus o implementaci aplikace jako modulu pro Netbeans, POZOR: není přidán do Mercurialu, možná později (pravděpodobně se ale nebude používat)
|
Line | |
---|
1 | package cz.frantovo.superPostak; |
---|
2 | |
---|
3 | import cz.frantovo.postak.Postak; |
---|
4 | import org.junit.Test; |
---|
5 | import static org.junit.Assert.*; |
---|
6 | |
---|
7 | /** |
---|
8 | * @author fiki |
---|
9 | */ |
---|
10 | public class PostakTest { |
---|
11 | |
---|
12 | @Test |
---|
13 | public void zkontrolujAdresu() { |
---|
14 | System.out.println("zkontrolujAdresu"); |
---|
15 | |
---|
16 | String[] adresyDobre = {"abcd@example.com", "aa.bb@seznam.cz", "nbusr123@example.name", "VeLkA@pIsMeNa.COM"}; |
---|
17 | String[] adresySpatne = {"adresaATexampleDOTcom", "nějaká adresa", "adresa @seznam.cz"}; |
---|
18 | |
---|
19 | for (String adresa : adresyDobre) { |
---|
20 | System.out.println("Kontroluji: " + adresa); |
---|
21 | assertEquals(true, Postak.zkontrolujAdresu(adresa)); |
---|
22 | } |
---|
23 | |
---|
24 | System.out.println(); |
---|
25 | |
---|
26 | for (String adresa : adresySpatne) { |
---|
27 | System.out.println("Kontroluji: " + adresa); |
---|
28 | assertEquals(false, Postak.zkontrolujAdresu(adresa)); |
---|
29 | } |
---|
30 | } |
---|
31 | } |
---|