Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Oppiskele Assertions Practice | Unit Tests
Java JUnit Library. Types of Testing

bookAssertions Practice

It's time to practice with different Assertions. A class has been written for you with some methods. Tests for these methods are already written, but for some reason, they keep failing. Your task is to find out the reason for this. The problem lies in the tests, not the code.

Pay close attention to the expected and actual values. This way, you will understand what needs to be used in a specific test case.

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 2. Luku 7

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

Suggested prompts:

What are the different types of assertions used in these tests?

Can you explain why the tests were failing before?

How do I know which assertion to use in each test case?

bookAssertions Practice

Pyyhkäise näyttääksesi valikon

It's time to practice with different Assertions. A class has been written for you with some methods. Tests for these methods are already written, but for some reason, they keep failing. Your task is to find out the reason for this. The problem lies in the tests, not the code.

Pay close attention to the expected and actual values. This way, you will understand what needs to be used in a specific test case.

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 2. Luku 7
some-alt