Skip to content

mjerkovic/writing-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Classes to be used for practicing writing unit tests.

  1. Start by writing a unit test for Rational.java

Rational Numbers

A rational number n / d is represented by two integers

its numerator n

and

its denominator d

the following operations can be performed on rationals

Addition

n1/d1 + n2/d2 = (n1d2+n2d1) / (d1d2)

Subtraction

n1/d1 - n2/d2 = (n1d2-n2d1)/(d1d2)

Multiplication

n1/d1 * n2/d2 = (n1n2) / (d1d2)

Division

n1/d1 / n2/d2 = (n1d2) / (d1n2)

Equality

n1/d1 = n2/d2 if and only if (iff) n1d2 = d1n2

  1. Write tests for the classes in the com.aconex.tutorial.tests.bank package

  2. Write tests for the classes in the com.aconex.tutorial.tests.crm package

    • Feel free to refactor any classes to make testing easier.

About

Test writing assignments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages