Skip to content

Conversation

albertache1998
Copy link
Contributor

Added unit tests

@Test
fun `test creating a list of lists using Array() and fill()`() {
val listOfLists = Array(3) { Array(5) { 0 } }
assertEquals(3, listOfLists.size)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a space between setup and assertion like you do in the other tests?

class ListOfListsUnitTest {

@Test
fun `test creating a list of lists using listOf()`() {
Copy link
Contributor

@acerasoni acerasoni Jan 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we rename the tests to follow the proper naming convention? You can find it here: https://docs.google.com/document/d/1I6eu-eH5D1E0Mkl0Al-4xTgYiK2Ny0PPGtXaN2ToepI/edit

Example:
test creating a list of lists using listOf() -> Creates an immutable list of immutable lists when using listOf()

Please note we should specify what kind of outer and inner lists we are creating (immutable or mutable)

@acerasoni acerasoni merged commit 7bb3d7f into Baeldung:master Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants