@Test public void submitReturnsBadOutputWhenCodeIsBad() throws Exception { PowerMockito.when(ClientData.userDataExists()).thenReturn(true); paste.setParameter("path", "/hieno/path"); String result = paste.parseData(paste.call()).get(); assertTrue(result.contains(pasteUrl)); }
/** Check that data checking success. */ @Test public void testCheckDataSuccess() throws ProtocolException, IOException { PowerMockito.when(ClientData.userDataExists()).thenReturn(true); paste.setParameter("path", "/home/tmccli/uolevipuistossa"); paste.checkData(); }