()
| 42 | // Asserts that each call to a Wrapper invokes the correct method on the Wrappee. |
| 43 | |
| 44 | @Test |
| 45 | public void testSucess() throws IOException { |
| 46 | |
| 47 | DummyLoadFunc loadFunc = new DummyLoadFunc(); |
| 48 | MockWrapper wrapper = new MockWrapper(loadFunc); |
| 49 | |
| 50 | wrapper.relativeToAbsolutePath(null,null); |
| 51 | assertEquals("relativeToAbsolutePath", loadFunc.getLastMethodCalled()); |
| 52 | |
| 53 | wrapper.setLocation(null,null); |
| 54 | assertEquals("setLocation", loadFunc.getLastMethodCalled()); |
| 55 | |
| 56 | wrapper.getInputFormat(); |
| 57 | assertEquals("getInputFormat", loadFunc.getLastMethodCalled()); |
| 58 | |
| 59 | wrapper.getLoadCaster(); |
| 60 | assertEquals("getLoadCaster", loadFunc.getLastMethodCalled()); |
| 61 | |
| 62 | wrapper.prepareToRead(null,null); |
| 63 | assertEquals("prepareToRead", loadFunc.getLastMethodCalled()); |
| 64 | |
| 65 | wrapper.getNext(); |
| 66 | assertEquals("getNext", loadFunc.getLastMethodCalled()); |
| 67 | |
| 68 | wrapper.setUDFContextSignature(null); |
| 69 | assertEquals("setUDFContextSignature", loadFunc.getLastMethodCalled()); |
| 70 | |
| 71 | NoSuchElementException e = null; |
| 72 | try { |
| 73 | loadFunc.getLastMethodCalled(); |
| 74 | } catch (NoSuchElementException ex) { |
| 75 | e = ex; |
| 76 | } |
| 77 | |
| 78 | assertNotNull("The wrapped class had more method invokations than it should have", e); |
| 79 | } |
| 80 | |
| 81 | // Asserts that each call to an improperly initialized Wrapper fails. |
| 82 | @Test |
nothing calls this directly
no test coverage detected