Skip to content

OOP2020/coinpurse-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Unit Tests for Coin Purse

The tests directory contains JUnit tests for classes in the Polymorphic Purse lab.

You need the JUnit 4 libraries (JARs) to run these tests. BlueJ and Eclipse include JUnit 4. IntelliJ IDEA will download the JUnit files when it detects a project that needs them (it prompts you for permission). For VS Code you need to install JUnit yourself, then add the JARs as project dependencies.

test is the standard name for a folder containing test source code. Its not a package name. So, test/coinpurse/CoinTest.java is in package coinpurse.

Eclipse, IDEA, and NetBeans support projects with separate folders for application source and test source, but BlueJ does not. If you are using BlueJ you will need to copy the test classes into your BlueJ project.

How to Run

You can run each test separately (as a JUnit test suite) or run the TestRunner class as an ordinary Java "main" class.

The lab2-test repository has instructions for using JUnit with BlueJ and VS Code.

About

JUnit tests for Coin Purse code

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages