forked from giovanniacg/AluguelCarros
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
def3478
commit c46091e
Showing
5 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package Pessoas; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import Sistema.BancoDados; | ||
|
||
class AdminTest { | ||
|
||
@Test | ||
void testTesteLogin() { | ||
BancoDados.cadastrarAdm[0] = new Admin("Login1", "123"); | ||
|
||
assertEquals(false, Admin.TesteLogin("Login1")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package Pessoas; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
class UsuarioTest { | ||
|
||
@Test | ||
void testIsCPF() { | ||
assertEquals(false, Usuario.isCPF("123456789")); | ||
assertEquals(true, Usuario.isCPF("95337616013")); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package Sistema; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import Pessoas.Admin; | ||
import Pessoas.Usuario; | ||
|
||
class LoginTest { | ||
|
||
@Test | ||
void testLogando() { | ||
BancoDados.cadastrarAdm[0] = new Admin("Login", "Senha"); | ||
|
||
assertEquals(false, Login.Logando("Login", "a")); | ||
assertEquals(false, Login.Logando("a", "Senha")); | ||
assertEquals(true, Login.Logando("Login", "Senha")); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package veiculo; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import Sistema.BancoDados; | ||
import Sistema.Login; | ||
|
||
class AgenciaTest { | ||
|
||
@Test | ||
void testTesteId() { | ||
BancoDados.cadastrarAgencia[0] = new Agencia("AG001", "Rua 3", "35", "Bairro principal", "São Paulo", "Estado do bem", | ||
"Melhor Pais"); | ||
|
||
assertEquals(false, Agencia.TesteId("AG001")); | ||
assertEquals(true, Agencia.TesteId("AG002")); | ||
} | ||
} |