mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-12-21 15:59:48 +01:00
Cleanup Code
Pushed-by: Rene Pfeuffer<rene.pfeuffer@cloudogu.com> Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
This commit is contained in:
@@ -41,12 +41,7 @@ import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
import static org.mockito.MockitoAnnotations.initMocks;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
*/
|
||||
public class SvnRepositoryHandlerTest extends SimpleRepositoryHandlerTestBase {
|
||||
|
||||
@Mock
|
||||
|
||||
@@ -43,7 +43,6 @@ import sonia.scm.repository.client.api.RepositoryClientException;
|
||||
/**
|
||||
* Client provider factory for subversion.
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
* @since 1.51
|
||||
*/
|
||||
public class SvnRepositoryClientFactoryProvider implements RepositoryClientFactoryProvider {
|
||||
|
||||
@@ -34,7 +34,6 @@ import java.util.Set;
|
||||
/**
|
||||
* Subversion repository client provider.
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
* @since 1.51
|
||||
*/
|
||||
public class SvnRepositoryClientProvider extends RepositoryClientProvider {
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
package sonia.scm.repository.spi;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import org.junit.Test;
|
||||
import sonia.scm.repository.BlameLine;
|
||||
@@ -34,12 +33,7 @@ import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
*/
|
||||
public class SvnBlameCommandTest extends AbstractSvnCommandTestBase
|
||||
{
|
||||
|
||||
@@ -85,12 +79,7 @@ public class SvnBlameCommandTest extends AbstractSvnCommandTestBase
|
||||
checkFirstLine(line);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @param line
|
||||
*/
|
||||
|
||||
private void checkFirstLine(BlameLine line)
|
||||
{
|
||||
assertEquals(1, line.getLineNumber());
|
||||
@@ -102,12 +91,7 @@ public class SvnBlameCommandTest extends AbstractSvnCommandTestBase
|
||||
assertNull(line.getAuthor().getMail());
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
||||
private SvnBlameCommand createCommand()
|
||||
{
|
||||
return new SvnBlameCommand(createContext());
|
||||
|
||||
@@ -49,9 +49,7 @@ import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
/**
|
||||
* @author Sebastian Sdorra
|
||||
*/
|
||||
|
||||
public class SvnBrowseCommandTest extends AbstractSvnCommandTestBase {
|
||||
|
||||
@Rule
|
||||
@@ -310,24 +308,13 @@ public class SvnBrowseCommandTest extends AbstractSvnCommandTestBase {
|
||||
return context;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
||||
private SvnBrowseCommand createCommand() {
|
||||
return new SvnBrowseCommand(createContext());
|
||||
}
|
||||
|
||||
//~--- get methods ----------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
* @param foList
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
|
||||
private FileObject getFileObject(Collection<FileObject> foList, String name) {
|
||||
return foList.stream()
|
||||
.filter(f -> name.equals(f.getName()))
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
package sonia.scm.repository.spi;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import com.google.common.io.ByteSink;
|
||||
import com.google.common.io.Files;
|
||||
@@ -42,12 +41,7 @@ import static org.hamcrest.Matchers.notNullValue;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
*/
|
||||
public class SvnBundleCommandTest extends AbstractSvnCommandTestBase
|
||||
{
|
||||
|
||||
@@ -67,7 +61,6 @@ public class SvnBundleCommandTest extends AbstractSvnCommandTestBase
|
||||
|
||||
//~--- fields ---------------------------------------------------------------
|
||||
|
||||
/** Field description */
|
||||
@Rule
|
||||
public TemporaryFolder temp = new TemporaryFolder();
|
||||
}
|
||||
|
||||
@@ -37,8 +37,6 @@ import java.io.InputStream;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
public class SvnCatCommandTest extends AbstractSvnCommandTestBase {
|
||||
|
||||
@Rule
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
package sonia.scm.repository.spi;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import com.google.common.collect.Iterables;
|
||||
import org.junit.Test;
|
||||
@@ -36,12 +35,7 @@ import java.util.stream.StreamSupport;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
*/
|
||||
public class SvnLogCommandTest extends AbstractSvnCommandTestBase
|
||||
{
|
||||
|
||||
@@ -193,12 +187,7 @@ public class SvnLogCommandTest extends AbstractSvnCommandTestBase
|
||||
assertEquals("1", c2.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
||||
private SvnLogCommand createCommand()
|
||||
{
|
||||
return new SvnLogCommand(createContext());
|
||||
|
||||
@@ -24,15 +24,12 @@
|
||||
|
||||
package sonia.scm.web;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
@@ -42,27 +39,18 @@ import java.util.Locale;
|
||||
public class SvnUserAgentProviderTest
|
||||
{
|
||||
|
||||
/** Field description */
|
||||
private static final String UA_1 =
|
||||
"SVN/1.8.8 (x64-microsoft-windows) serf/1.3.4 TortoiseSVN-1.8.6.25419";
|
||||
|
||||
/** Field description */
|
||||
private static final String UA_2 = "SVN/1.5.4 (r33841) neon/0.28.3";
|
||||
|
||||
/** Field description */
|
||||
private static final String UA_3 = "SVN/1.6.3 (r38063) neon/0.28.4";
|
||||
|
||||
/** Field description */
|
||||
private static final String UA_4 =
|
||||
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0;Google Wireless Transcoder;)";
|
||||
|
||||
//~--- methods --------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*/
|
||||
@Test
|
||||
@Test
|
||||
public void testParseUserAgent()
|
||||
{
|
||||
assertEquals(SvnUserAgentProvider.TORTOISE_SVN, parse(UA_1));
|
||||
@@ -71,14 +59,7 @@ public class SvnUserAgentProviderTest
|
||||
assertNull(parse(UA_4));
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @param ua
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
||||
private UserAgent parse(String ua)
|
||||
{
|
||||
return suap.parseUserAgent(ua.toLowerCase(Locale.ENGLISH));
|
||||
@@ -86,6 +67,5 @@ public class SvnUserAgentProviderTest
|
||||
|
||||
//~--- fields ---------------------------------------------------------------
|
||||
|
||||
/** Field description */
|
||||
private final SvnUserAgentProvider suap = new SvnUserAgentProvider();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user