The main target of this repository is learning about TDD, requirements engineering and unit tests using jUnit 5 and Java SE 8. Bonus! Also, learning unit testing on Python
"Test-driven development (TDD) is a software development process that relies on the repetition of a very short development cycle: requirements are turned into very specific test cases, then the software is improved to pass the new tests." — Wikipedia
- Once a pitcher is created, its content will be 0
- Once a pitcher is empty, its content will be 0
- Full refilling a pitcher will make its content will be equals to its capacity
- Let
a
be the content of the PitcherA
and letb
be the capacity of the PitcherB
. Ifa > b
then, ifB
is refilled withA
then the content ofB
will be equals tob
and the content ofA
is equals toa - b
. - If the pitcher is going to be refilled with a content higher than its capacity, then the content will be equals to its capacity
- The smallest dimension of a matrix is 1x1.
- When a matrix is created, every element of the matrix is equals to 0
- To add two matrices, both must have same dimensions
- To subtract two matrices, both must have same dimensions
- Let
AxB
be the dimensions of the Matrixm1
and letCxD
the dimensions of another Matrixm2
, to multiplym1 * m2
,B
must be equals toC
and the resultant matrix dimension isAxD
- Let
c
be a scalar number andm1
a Matrix. Multiplyingc
withm1
is equals to multiply every element inm1
withc
. In other words.∀ x ∈ m1, y = x * c
being y the elements of the resulting matrix. - Let
c
be a scalar number andm1
a Matrix. Dividingc
withm1
is equals to divide every element inm1
withc
. In other words.∀ x ∈ m1, c ≠ 0, y = x / c
being y the elements of the resulting matrix. - Let
m1
be a Matrix andm2
its transposed.m1[x][y] == m2[y][x]
for every x and y belonging toAxB
(m1
andm2
dimension). - The determinant of a Matrix is calculated with the Sarrus rule (3x3 Matrices), with the generic formula (2x2) or just is the element (1x1). (Not sure about my english over here lol)
- If the number is divisible by 3, return Fizz
- If the number is divisible by 5, return Buzz
- If the number is divisible by 3 and 5, return FizzBuzz
- In the other cases, return the number
Solving the String Calculator from Roy Osherove's page
- An empty string returns zero
- A single number returns the value
- Two numbers, comma delimited, returns the sum
- Two numbers, newline delimited, returns the sum
- Three numbers, delimited either way, returns the sum
- Negative numbers throw an exception
- Numbers greater than 1000 are ignored
- A single char delimiter can be defined on the first line (e.g. //# for a
#
as the delimiter) - A multi char delimiter can be defined on the first line (e.g. //[###] for
###
as the delimiter) - Many single or multi-char delimiters can be defined (each wrapped in square brackets)
Solving the password verifier kata from Roy Osherove's page
- password should be larger than 8 character
- password should not be null
- password should have one uppercase letter at least
- password should have one lowercase letter at least
- password should have one number at least
Done until this point.
Todo
- Password is OK if at least three of the previous conditions is true
- Password is never OK if item 1.4 (1 lowercase at least) is false
A wrapper class to represent euros and it's behaviour.
All the code wrote in Java is being written in Python (just for fun and learning unit testing in Python)