Skip to content

Commit c102d7f

Browse files
committed
A public api, permalink, a bank account
1 parent 8dd0eb2 commit c102d7f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

wiki/Writing-tests-with-good-behavioural-coverage.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ This function checks various conditions on the input string text to determine wh
490490

491491
The goal when testing domain errors is to ensure that the application correctly identifies and responds to these errors as part of its normal operation.
492492

493-
**Test samples from [FractionParserTest.kt](https://github.com/oppia/oppia-android/blob/develop/utility/src/test/java/org/oppia/android/util/math/FractionParserTest.kt):**
493+
**Test samples from [FractionParserTest.kt](https://github.com/oppia/oppia-android/blob/f9106d91297abd09b24da25d5485deb8473b0125/utility/src/test/java/org/oppia/android/util/math/FractionParserTest.kt#L19):**
494494

495495
```kotlin
496496
@Test
@@ -777,7 +777,7 @@ A public API (Application Programming Interface) refers to the set of methods, p
777777

778778
Public APIs are essential because they provide a way to interact with the functionality of a class or module without exposing its internal workings. They define how external code can use the functionality offered by the class or module, ensuring that interactions are safe and predictable while keeping the internal implementation hidden and secure.
779779

780-
Let's consider the following example for a public API to withdraw money from the BankAccount.
780+
Let's consider the following example for a public API to withdraw money from a BankAccount.
781781

782782
```kotlin
783783
class BankAccount(
@@ -833,7 +833,7 @@ class BankAccount(
833833

834834
The **`withdraw`** method serves as the single public entry point for withdrawing money from the account. It handles user validation, amount checking, optional file upload and printing of the receipt. By keeping the internal methods private, the class ensures that the operations are performed in a controlled manner while hiding the complexity of these operations from the user.
835835

836-
## How to Write Tests for Public API
836+
## How to Write Tests for a Public API
837837

838838
```sh
839839
+---------+ +---------------+ +-----------+ +--------+

0 commit comments

Comments
 (0)