forked from mauricioaniche/workshop-tdd
-
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.
separando em modulos; acertando alguns exercicios que estavam estranhos
- Loading branch information
1 parent
abb2207
commit acc6c58
Showing
35 changed files
with
109 additions
and
134 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 @@ | ||
/modulo2 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...rcicio/desconto/AplicadorDeDescontos.java → ...rcicio/desconto/AplicadorDeDescontos.java
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package exercicio.desconto; | ||
package modulo1.exercicio.desconto; | ||
|
||
public class AplicadorDeDescontos { | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
src/exercicio/desconto/Compra.java → src/modulo1/exercicio/desconto/Compra.java
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package exercicio.desconto; | ||
package modulo1.exercicio.desconto; | ||
|
||
import java.util.List; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
src/exercicio/desconto/Item.java → src/modulo1/exercicio/desconto/Item.java
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package exercicio.desconto; | ||
package modulo1.exercicio.desconto; | ||
|
||
public class Item { | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
src/exercicio/lista/GeradorDeResumo.java → ...ulo1/exercicio/lista/GeradorDeResumo.java
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package exercicio.lista; | ||
package modulo1.exercicio.lista; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
2 changes: 1 addition & 1 deletion
2
src/exercicio/lista/Negocio.java → src/modulo1/exercicio/lista/Negocio.java
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package exercicio.lista; | ||
package modulo1.exercicio.lista; | ||
|
||
import java.util.Calendar; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
src/exercicio/lista/Resumo.java → src/modulo1/exercicio/lista/Resumo.java
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package exercicio.lista; | ||
package modulo1.exercicio.lista; | ||
|
||
import java.util.Calendar; | ||
|
||
|
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,8 @@ | ||
package modulo1.exercicio.maiormenor; | ||
|
||
public class MaiorEMenor { | ||
|
||
public static void main(String[] args) { | ||
|
||
} | ||
} |
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,26 @@ | ||
package modulo2.exercicio.datas; | ||
|
||
import java.util.Calendar; | ||
|
||
|
||
public class GeradorDeOrcamento { | ||
|
||
public double calculaDesconto(Compra compra) { | ||
|
||
if(janeiro()) return compra.getValorLiquido() * 0.05; | ||
if(natal()) return compra.getValorLiquido() * 0.15; | ||
|
||
return 0; | ||
} | ||
|
||
private boolean natal() { | ||
Calendar hoje = Calendar.getInstance(); | ||
return hoje.get(Calendar.MONTH) == Calendar.DECEMBER && | ||
hoje.get(Calendar.DAY_OF_MONTH) == 25; | ||
} | ||
|
||
private boolean janeiro() { | ||
Calendar hoje = Calendar.getInstance(); | ||
return hoje.get(Calendar.MONTH) == Calendar.JANUARY; | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
src/exercicio/datas/Item.java → src/modulo2/exercicio/datas/Item.java
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package exercicio.datas; | ||
package modulo2.exercicio.datas; | ||
|
||
public class Item { | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
src/exercicio/mocks/Fatura.java → src/modulo2/exercicio/mocks/Fatura.java
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package exercicio.mocks; | ||
package modulo2.exercicio.mocks; | ||
|
||
import java.util.Calendar; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
src/exercicio/mocks/FiltroDeFaturas.java → ...ulo2/exercicio/mocks/FiltroDeFaturas.java
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
2 changes: 1 addition & 1 deletion
2
...exercicio/mocks/RepositorioDeFaturas.java → ...exercicio/mocks/RepositorioDeFaturas.java
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package exercicio.mocks; | ||
package modulo2.exercicio.mocks; | ||
|
||
import java.util.List; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
src/exercicio/mocks/captor/PreCadastro.java → ...2/exercicio/mocks/captor/PreCadastro.java
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package exercicio.mocks.captor; | ||
package modulo2.exercicio.mocks.captor; | ||
|
||
public class PreCadastro { | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
src/exercicio/mocks/captor/Produto.java → ...dulo2/exercicio/mocks/captor/Produto.java
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package exercicio.mocks.captor; | ||
package modulo2.exercicio.mocks.captor; | ||
|
||
public class Produto { | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...o/mocks/captor/RepositorioDeProdutos.java → ...o/mocks/captor/RepositorioDeProdutos.java
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
2 changes: 1 addition & 1 deletion
2
...ks/captor/TransformadorDePreCadastro.java → ...ks/captor/TransformadorDePreCadastro.java
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package exercicio.mocks.captor; | ||
package modulo2.exercicio.mocks.captor; | ||
|
||
import java.util.List; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...o/mocks/verify/AtualizadorDeCadastro.java → ...o/mocks/verify/AtualizadorDeCadastro.java
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package exercicio.mocks.verify; | ||
package modulo2.exercicio.mocks.verify; | ||
|
||
import java.util.List; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
src/exercicio/mocks/verify/Produto.java → ...dulo2/exercicio/mocks/verify/Produto.java
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package exercicio.mocks.verify; | ||
package modulo2.exercicio.mocks.verify; | ||
|
||
public class Produto { | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
src/exercicio/mocks/verify/ProdutoDao.java → ...o2/exercicio/mocks/verify/ProdutoDao.java
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package exercicio.mocks.verify; | ||
package modulo2.exercicio.mocks.verify; | ||
|
||
public interface ProdutoDao { | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
src/exercicio/tdd/romano/NumeralRomano.java → ...2/exercicio/tdd/romano/NumeralRomano.java
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package exercicio.tdd.romano; | ||
package modulo2.exercicio.tdd.romano; | ||
|
||
|
||
public class NumeralRomano { | ||
|
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,12 @@ | ||
package modulo2.exercicio.tdd.sessoes; | ||
|
||
import java.util.List; | ||
|
||
public class GeradorDeSessoes { | ||
|
||
public List<Sessao> gera(int inicio, int fim, Periodo periodo) { | ||
// aqui... ;) | ||
return null; | ||
} | ||
|
||
} |
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,18 @@ | ||
package modulo2.exercicio.tdd.sessoes; | ||
|
||
public enum Periodo { | ||
|
||
DIARIA(1), | ||
SEMANAL(7), | ||
MENSAL(30); | ||
|
||
private int tamanho; | ||
|
||
Periodo(int tamanho) { | ||
this.tamanho = tamanho; | ||
} | ||
|
||
public int getTamanho() { | ||
return tamanho; | ||
} | ||
} |
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,18 @@ | ||
package modulo2.exercicio.tdd.sessoes; | ||
|
||
|
||
public class Sessao { | ||
|
||
|
||
private int numero; | ||
|
||
public Sessao(int numero) { | ||
this.numero = numero; | ||
} | ||
|
||
public int getNumero() { | ||
return numero; | ||
} | ||
|
||
|
||
} |
2 changes: 1 addition & 1 deletion
2
src/exercicio/dao/Produto.java → src/modulo3/exercicio/dao/Produto.java
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package exercicio.dao; | ||
package modulo3.exercicio.dao; | ||
|
||
public class Produto { | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
src/exercicio/dao/ProdutoDao.java → src/modulo3/exercicio/dao/ProdutoDao.java
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
2 changes: 1 addition & 1 deletion
2
src/exercicio/selenium/GoogleTest.java → ...odulo3/exercicio/selenium/GoogleTest.java
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
2 changes: 1 addition & 1 deletion
2
src/exercicio/xml/LeitorDeXml.java → src/modulo3/exercicio/xml/LeitorDeXml.java
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package exercicio.xml; | ||
package modulo3.exercicio.xml; | ||
|
||
import java.io.IOException; | ||
import java.io.Reader; | ||
|
2 changes: 1 addition & 1 deletion
2
src/exercicio/xml/Negocio.java → src/modulo3/exercicio/xml/Negocio.java
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package exercicio.xml; | ||
package modulo3.exercicio.xml; | ||
|
||
public class Negocio { | ||
|
||
|