Skip to content
This repository has been archived by the owner on Dec 11, 2024. It is now read-only.

[Codelab Issue] Testing Codelab 5.1 Testing Basics: Step 6 - assertEquals() parameters swapped #190

Closed
Abhimanyu14 opened this issue Sep 2, 2020 · 1 comment

Comments

@Abhimanyu14
Copy link

Describe the problem
Swapped expected and actual arguments

In which lesson and step of the codelab can this issue be found?
Advanced Android in Kotlin 05.1: Testing Basics - Steps 6

How to reproduce?
Docs issue.
Advanced Android in Kotlin 05.1: Testing Basics -> 6. Task: Writing your first test -> Step 2: Write your first test function -> 6. Check that result is what you expected, using assertions.

Code in docs :
// Check the result
assertEquals(result.completedTasksPercent, 0f)
assertEquals(result.activeTasksPercent, 100f)

The first parameter of assertEquals() should be the expected value and the second parameter is the actual value,

Code should be :
assertEquals(0f, result.completedTasksPercent)
assertEquals(100f, result.activeTasksPercent)

Versions

Additional information

codelab: advanced-android-kotlin

@Abhimanyu14 Abhimanyu14 changed the title [Codelab Issue] Testing Codelab 5.#, Step # - assertEquals() parameters swapped [Codelab Issue] Testing Codelab 5.1 Testing Basics: Step 6 - assertEquals() parameters swapped Sep 2, 2020
@JoseAlcerreca
Copy link
Contributor

dup #241

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants