SE450: Comment on integration tests [2/5] Previous pageContentsNext page

A nice way to generate an integration test (like myhw2.main.TEST1):

+ write a driver with some print statements, like this:


  which may output something like

    Title1 (2000) : Director1 [10,0,0]

+ read the output to check it and make sure it's okay

+ then replace the System.output with an assert:

    Assert.assertEquals("Title1 (2000) : Director1 [10,0,0]",

Now you can run the test over and over and it will make sure that the
output is always what you got the time you checked it.

Previous pageContentsNext page