I've read the docs for the Junit ExpectedException class, and the parameter for the .expect() method seems to be implemented strangely in all the examples I've studies. When you pass in the expected exception type, it has a .class extension that doesn't appear to be a method of any kind.
Can someone please explain this syntax? Thank you. Example code is below:
public ExpectedException thrown = ExpectedException.none();
public void testPlusException() {
thrown.expect(RuntimeException.class);
Vector testVector = vector1.plus(vector3);
}