Exercicio envolvendo criação de Classe, Junit 5 e exception

Related tags

Testing ClasseData
Overview

ClasseData

Complemente a classe Data desenvolvida anteriormente para que lance uma ExcecaoDataInvalida. Com esta única exceção, você deverá ser capaz de tratar valores inválidos nos métodos setAno, setMes e setDia. Utilize um construtor com parâmetros para que a exceção consiga diferenciar cada um dos erros e construir uma mensagem de erro adequada.

Altere o método main da classe Aplicacao para tratar essa exceção. Altere o diagrama UML para refletir as modificações feitas no código.

Aprenda a utilizar o método assertThrows (Links para um site externo.) da JUnit 5 e elabora um caso de testes que valida o funcionamento da ExcecaoDataInvalida.

You might also like...

Testes unitários em Java utilizando JUnit 5

Testes unitários em Java utilizando JUnit Este curso tem como objetivo habilitar o(a) aluno(a) a testar soluções desenvolvidas na linguagem Java, torn

Jan 18, 2022

Testes unitários em Java utilizando JUnit

Testes unitários em Java utilizando JUnit Este curso tem como objetivo habilitar o(a) aluno(a) a testar soluções desenvolvidas na linguagem Java, torn

Nov 8, 2022

JUnit 5 extension for easy-random

Easy Random/Faker JUnit 5 extension The simple, stupid random Java™ beans generator for JUnit 5 The easy random extension provides a test with randoml

Nov 9, 2022

Intercept network request by running Selenium tests with JUnit on LambdaTest cloud.

Intercept network request by running Selenium tests with JUnit on LambdaTest cloud.

Run Selenium 4 Tests With JUnit On LambdaTest Blog ⋅ Docs ⋅ Learning Hub ⋅ Newsletter ⋅ Certifications ⋅ YouTube       Learn how to use JUnit framewor

Jul 11, 2022

Override device mode by running Selenium test with JUnit on LambdaTest cloud.

Override device mode by running Selenium test with JUnit on LambdaTest cloud.

Run Selenium 4 Tests With JUnit On LambdaTest Blog ⋅ Docs ⋅ Learning Hub ⋅ Newsletter ⋅ Certifications ⋅ YouTube       Learn how to use JUnit framewor

Jul 11, 2022

Emulate geolocation by running Selenium tests with JUnit on LambdaTest cloud.

Emulate geolocation by running Selenium tests with JUnit on LambdaTest cloud.

Run Selenium 4 Tests With JUnit On LambdaTest Blog ⋅ Docs ⋅ Learning Hub ⋅ Newsletter ⋅ Certifications ⋅ YouTube       Learn how to use JUnit framewor

Jul 11, 2022

Testes unitários em Java utilizando JUnit

Testes unitários em Java utilizando JUnit Este curso tem como objetivo habilitar o(a) aluno(a) a testar soluções desenvolvidas na linguagem Java, torn

Oct 13, 2022

Run Selenium 4 tests with JUnit on LambdaTest cloud.

Run Selenium 4 tests with JUnit on LambdaTest cloud.

Run Selenium 4 Tests With JUnit On LambdaTest Blog ⋅ Docs ⋅ Learning Hub ⋅ Newsletter ⋅ Certifications ⋅ YouTube       Learn how to use JUnit framewor

Jul 11, 2022

Check performance metrics by running Selenium 4 tests with JUnit on LambdaTest cloud.

Check performance metrics by running Selenium 4 tests with JUnit on LambdaTest cloud.

Run Selenium 4 Tests With JUnit On LambdaTest Blog ⋅ Docs ⋅ Learning Hub ⋅ Newsletter ⋅ Certifications ⋅ YouTube       Learn how to use JUnit framewor

Jul 11, 2022
Owner
Mateus Samartini
Our shadows are taller than our souls. Software Engineer Student working on some projects with Java, PHP, HTML 5, CSS and MySQL database
Mateus Samartini
A sample repo to help you capture JavaScript exception for automation test in Java-TestNG on LambdaTest. Run Selenium tests with TestNG on LambdaTest platform.

How to capture JavaScript exception for automation test in Java-TestNG on LambdaTest Environment Setup Global Dependencies Install Maven Or Install Ma

null 11 Jul 13, 2022
A sample repo to help you capture JavaScript exception for automation test in Java-selenium on LambdaTest. Run your Java Selenium tests on LambdaTest platform.

How to capture JavaScript exception for automation test in Java-selenium on LambdaTest Prerequisites Install and set environment variable for java. Wi

null 12 Jul 13, 2022
Randomized Testing (Core JUnit Runner, ANT, Maven)

RANDOMIZED TESTING ================== JUnit test runner and plugins for running JUnit tests with pseudo-randomness. See the following for more infor

null 167 Dec 26, 2022
A TestNG like dataprovider runner for JUnit with many additional features

junit-dataprovider Have a look to this repositories Wiki pages for documenation, usage examples and further information. Table of contents Home What i

TNG Technology Consulting GmbH 237 Sep 7, 2022
Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.

Testcontainers Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium we

null 6.7k Jan 9, 2023
CodeSheriff is a simple library that helps you in writing JUnit tests that check the quality of your code

CodeSheriff is a simple library that helps you in writing JUnit tests that check the quality of your code. For example, CodeSheriff may fail because you have methods in your code that have more than X lines of code, or that have complexity greater than Y.

Maurício Aniche 62 Feb 10, 2022
JUnit 5 Parameterized Test Yaml Test Data Source

Yamaledt — JUnit 5 Parameterized Tests Using Yaml and Jamal Introduction and usage Note This is the latest development documentation. This is a SNAPSH

Peter Verhas 4 Mar 23, 2022
This is a repository to collect JUnit Tests for GAD exercises at TUM in SS21

TUM_GAD_Tests_SS21 This is a repository to collect JUnit Tests for GAD exercises at TUM in SS21. These tests have been written by students for student

null 41 Oct 31, 2022
A template for Spring Boot REST API tested with JUnit 5 and Cucumber 6

demo-bdd Un template Spring Boot pour lancer un BDD/ATDD avec Cucumber 6 et JUnit 5. Maven et le JDK 17 seront nécessaires. Exécuter les tests Le proj

Rui Lopes 4 Jul 19, 2022
IntelliJ IDEA and JUnit: Writing, Finding, and Running Tests

IntelliJ IDEA and JUnit: Writing, Finding, and Running Tests ?? Webinar https://blog.jetbrains.com/idea/2021/11/live-stream-recording-intellij-idea-an

Christian Stein 11 Jul 23, 2022