The idea of a watchdog is that the software interacts with it (writes something to it) every so often (periodically) from the software, to prove the processor and software is running. If the write doesn't occur, due to the processor stopping, the WD triggers a reset.
So, yes you need some code, but if you're using Nios you'll have some code. Assuming you have a main loop in your code, simply insert a write to the appropriate WD register to 'kick' the watchdog. Providing the loop runs your WD will be kicked. There may be some restrictions on how quickly you write to it. Check the docs. There will be a maximum time within which you must write to it.
Testing such a feature opens quite a philosophical debate. You'll have to do something predictable to test a function that's there to detect an unpredictable event.
Simplest suggestion is, once you get it working, remove the line of code that kicks the WD and prove that the processor sits there continually resetting.
Cheers,
Alex