Junit check: failure value ("not yet implemented") ;?

What is the meaning of this piece of code?

eg.

@Test
    public void testGetDiameter() {
        **fail("Not yet implemented");**
    }
+4
source share
3 answers

Using the Eclipse IDE, if you create JUnit TestCase stubs, they will add test methods with fail("Not yet implemented"). So if you forgot to add a real implementation, the test script will fail and the error or confirmation error will appear as "not yet implemented."

, - eclipse , , . TODO: .

, PASS, , .

+6

throw new UnsupportedOperationException("Message")

, . , .

.

+1

, , , , , , , .

Perhaps your task is to replace it with a transmission.

0
source

Source: https://habr.com/ru/post/1527921/


All Articles