Documente online.
Zona de administrare documente. Fisierele tale
Am uitat parola x Creaza cont nou
 HomeExploreaza
upload
Upload




Discovering problems

computers


Discovering problems

Questions
1. Describe the steps that should be followed in order to create a
Junit to test a given class.

2. What should be done in a Unit test class to be sure that all the
tests methods can be run be a simple main call?

3. How should be compiled a source code to enable assertion mechanism?

4. How should be run a class to be sure that the assertions are
executed?

5. How you can get the "root" logger?

6. Which is the default level for each handler?

7. Which is the relation between loggers and handlers?




3.12.2 Problems
1. Create a class containing a static clause that throws an exception if assertions are not enabled. Demonstrate that this test works correctly.

2. Create a Triangle class. The class attributes represents the length of the triangle's sides. The class is able to determine the type of the triangle: scalene, isosceles and equilateral. Write a unit test that you feeel adequately to test this class.

Write an example using Handlers and Filters to log messages with any severity level over INFO in one file and any severity level including and below INFO in other file. The files should be written in simple text.



Va rog sa folositi Ant, Log4J si JUnit.

In proiectul ANT va rog sa apara urmatoarele targets:

init

build

dist

clean

doc

build_tests

run_tests

report

Deci ce inseamna fiecare target in ANT:
- init: initializare de proprietati, creare de directoare, etc.
- build: compilare, copiere de fisiere, patch de fisiere
- dist: pregatire jar, war, etc.
- doc: pregatire javadoc si alte documentatii
- clean: cleanup
- build_tests: compilare de unit tests
- run_tests: executie de unit tests
- report: generare raport de executie unit tests din fisierele XML
produse
de JUnit

Document Info


Accesari: 1393
Apreciat: hand-up

Comenteaza documentul:

Nu esti inregistrat
Trebuie sa fii utilizator inregistrat pentru a putea comenta


Creaza cont nou

A fost util?

Daca documentul a fost util si crezi ca merita
sa adaugi un link catre el la tine in site


in pagina web a site-ului tau.




eCoduri.com - coduri postale, contabile, CAEN sau bancare

Politica de confidentialitate | Termenii si conditii de utilizare




Copyright © Contact (SCRIGROUP Int. 2024 )