-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modulo 4 - Stub, Mock e Spy #2
Open
leco123
wants to merge
77
commits into
algaworks:main
Choose a base branch
from
leco123:MODULO-4
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
… conta com duas asserções.
-método quando Exception não é lançada:
…asserção, porque ocorre falha caso o método demore muito para ser executado, usado para não bloquear o processo de build. problema desse método é que fica bloqueado por 10 segundos.
…asserção, porque ocorre falha caso o método demore muito para ser executado, usado para não bloquear o processo de build. Esse é o melhor método para validar o tempo de executação, porque não deixa bloqueado por 10 segundos chegou no 1 segundo conforme foi configurado já lança o erro de teste
-Se o primeiro método falhar para e o resto das outras asserções não serão executadas.
-Se o primeiro método falhar para e o resto das outras asserções não serão executadas.
…existe duas formas: 1º) Criando variável de ambiente dentro do profile e adicionando o Assumptions. Signed-off-by: Alex de Carvalho <[email protected]>
…existe duas formas: 2º) Criando variável de ambiente dentro do profile e adicionando o @EnabledIfEnvironmentVariable(named = "ENV", matches = "DEV") Signed-off-by: Alex de Carvalho <[email protected]>
…ecutar testes via terminarl - Signed-off-by: Alex de Carvalho <[email protected]>
Signed-off-by: Alex de Carvalho <[email protected]>
Desabilitando a execução de teste via maven. Windows `mvn clean package '-Dmaven.test.skip=true'` Linux `mvn clean package -Dmaven.test.skip=true' Signed-off-by: Alex de Carvalho <[email protected]>
…lementei. Signed-off-by: Alex de Carvalho <[email protected]>
Signed-off-by: Alex de Carvalho <[email protected]>
[Cenário]-Dado um carrinho de compra com 0 itens Signed-off-by: Alex de Carvalho <[email protected]>
[Cenário]-Dado um carrinho de compra com 2 tipos de itens e quantidade 3 -> Remover produto carrinho Signed-off-by: Alex de Carvalho <[email protected]>
Signed-off-by: Alex de Carvalho <[email protected]>
Modulo 3 - Organizando testes unitários
Signed-off-by: Alex de Carvalho <[email protected]>
Signed-off-by: Alex de Carvalho <[email protected]>
Modulo 3
Signed-off-by: Alex de Carvalho <[email protected]>
Signed-off-by: Alex de Carvalho <[email protected]>
-Adicionado Dependência do Mockito. Signed-off-by: Alex de Carvalho <[email protected]>
-Adicionado Dependência do Mockito. Signed-off-by: Alex de Carvalho <[email protected]>
-Renomeando arquivos Signed-off-by: Alex de Carvalho <[email protected]>
-Criando Mock: -> 1º) Deve ser instanciado e criado um mock para classe; -> 2º) Precisa definir comportamento do mock; Signed-off-by: Alex de Carvalho <[email protected]>
Extensão do Mockito para o próprio JUnit -`@ExtendWith(MockitoExtension.class)` -`@Mock` Signed-off-by: Alex de Carvalho <[email protected]>
Signed-off-by: Alex de Carvalho <[email protected]>
Signed-off-by: Alex de Carvalho <[email protected]>
Signed-off-by: Alex de Carvalho <[email protected]>
Signed-off-by: Alex de Carvalho <[email protected]>
Signed-off-by: Alex de Carvalho <[email protected]>
Signed-off-by: Alex de Carvalho <[email protected]>
Signed-off-by: Alex de Carvalho <[email protected]>
Signed-off-by: Alex de Carvalho <[email protected]>
Signed-off-by: Alex de Carvalho <[email protected]>
Signed-off-by: Alex de Carvalho <[email protected]>
Signed-off-by: Alex de Carvalho <[email protected]>
-Dos nossos mocks; Signed-off-by: Alex de Carvalho <[email protected]>
Signed-off-by: Alex de Carvalho <[email protected]>
Signed-off-by: Alex de Carvalho <[email protected]>
Signed-off-by: Alex de Carvalho <[email protected]>
Signed-off-by: Alex de Carvalho <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.