PruebasFibonacci for the subject Mantenimiento y Pruebas del Software 2022

Repository with the aim to test with JUnit 5 an iterative version of computed Fibonacci sequence numbers given valid positions.

This repository provides:

  • Class "Fibonacci.java", which contains a method to compute the Fibonacci sequence number in a valid position. Negative positions are invalid.
  • Class "FibonacciTest.java", which contains JUnit 5 test cases to test the functionality of the "compute" method in "Fibonacci.java".

Test cases:

  • Should compute return zero if the position is zero.
  • Should compute return one if the position is one.
  • Should compute return one if the position is two.
  • Should compute return two if the position is three.
  • Should compute return three if the position is four.
  • Should compute return fifty-five if the position is ten.
  • Should compute of a negative number raise an exception.

Images:

coverage.png

coverage.png

commits.png

commits.png