Skip to content

mguelog/pruebas-fibonacci

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pruebas-fibonacci

This repository was created with the objective of testing a Fibonacci sequence function using jUnit 5, for the subject Mantenimiento y Pruebas del Software.

Files

  • Fibonacci.java : class that implements compute(int n), a method that returns the n-positioned number in Fibonacci sequence.
  • FibonacciTest.java : class containing tests with jUnit 5, for testing compute method. In this class we can find the following test cases:
    • Should compute zero if number is zero.
    • Should compute one if number is one.
    • Should compute one if number is two.
    • Should compute two if number is three.
    • Should compute three if number is four.
    • Should compute thirteen if number is seven.
    • Should compute 144 if number is twelve.
    • Should raise an exception if number is negative.

With these tests, we can obtaing a 100% coverage.

alt text

Commits

The final commits tree looks like this:

alt text

About

Repository containing a simple implementation of fibonacci function and its unit tests.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages