Giter VIP home page Giter VIP logo

tum_homework's Introduction

Unit Tests for TUM Informatic's Homework

Disclaimer: Do not solely rely on these Unit Tests for correction. Mistakes happen and sometimes things may slip past the tests.

Availible Subjects

  • EIDI 1 WS16
  • GAD SS17

Contact

You can also notify us of issues and bugs by submitting a GitHub issue.

Purpose of a Unit Test

The Unit Test's purpose, is to help identify errors in the programs written for PGDP and GAD. It does this by creating test cases, in which inputs are entered into the classes, methods being run and finally checking to see if the output is what is to be expected.

Setup

The setup of the UnitTests vary depending on the IDE. If your IDE is not listed here, post it as an issue.

Eclipse
1. Select the Project
2. Click: Project > Properties
3. Click: Java Build Path > Libraries > Add Library...
4. Click: Junit > Next > Select Junit 4 (or higher) > Finish

https://youtu.be/CD5JJ5bDAfY?t=2m33s

NetBeans
1. Select the Project
2. Right click on Libaries
3. Add Libary
4. Select "Junit 4.12" (or higher) and add libary
5. Right Click on Project > New > Other > Junit Test
6. Move your method and the method's test class into the Junit Test
7. Right Click on MethodNameTest > Test File

https://www.youtube.com/watch?v=C6oQqbqPBB0

IntelliJ
1. Either put the Test and Production Code (your code) into the TestFolder
2. Or be sure to fix your imports and scope (it is just a bit cleaner).

https://www.youtube.com/watch?v=Bld3644bIAo

BlueJ

BlueJ automatically comes with JUnit, thus you will not need to import it into your project. Be aware that BLUEJ uses an OUTDATED version of JUNIT, thus may not accept all methods used in the test. It is advisable to have eclipse of another IDE for testing purposes.

1. Copy the Test Files into your Project
2. Restart BlueJ
3. Compile. The Unit Test should turn Green
4. Right Click on the Unit Test and hit Test All (or the specific Test you require)

tum_homework's People

Contributors

gott50 avatar aetherv avatar benediktwerner avatar aevyz avatar masrepus avatar erainy avatar hbirler avatar

Watchers

Stephan Le avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.