N
N
niknamme2019-10-12 18:54:24
Java
niknamme, 2019-10-12 18:54:24

How to use unit tests for an array?

Hello! I'm new to Java.
Task
I have created a two-dimensional array from the consoles, it can be filled, the whole function is in the main method.
Question:
How can you unit test the main method with a two-dimensional array?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
fan92rus, 2019-10-13
@fan92rus

unit tests are written not for arrays but for methods, call the method giving boundary values ​​(and null), and check that it returns the correct result...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question