Practice More Questions From: Quiz 03 – Unit Testing
Q:
If you want to run a setUp method before every test method, what should you write?
Q:
Will this test pass, fail or throw an error? assertThrows(IndexOutOfBoundsException.class, () -> { // ArrayLists are like arrays in Python ArrayList myList = new ArrayList(); // return the first element of the list String firstString = myList.get(0); });
Q:
What types of comparisons should we use for each data type?
Q:
Which of the following methods checks if two object references point to the same object?
Q:
When Eclipse and the JUnit framework creates new test method stubs for you, what is automatically filled in and what is the reason for that?
Subscribe
0 Comments