Cleanup Code

Pushed-by: Rene Pfeuffer<rene.pfeuffer@cloudogu.com>
Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
This commit is contained in:
Laura Gorzitze
2024-02-06 14:54:00 +01:00
parent b34a989c57
commit d8e1f2d739
910 changed files with 2670 additions and 19707 deletions

View File

@@ -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

View File

@@ -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 {

View File

@@ -34,7 +34,6 @@ import java.util.Set;
/**
* Subversion repository client provider.
*
* @author Sebastian Sdorra
* @since 1.51
*/
public class SvnRepositoryClientProvider extends RepositoryClientProvider {

View File

@@ -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());

View File

@@ -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()))

View File

@@ -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();
}

View File

@@ -37,8 +37,6 @@ import java.io.InputStream;
import static org.junit.Assert.assertEquals;
//~--- JDK imports ------------------------------------------------------------
public class SvnCatCommandTest extends AbstractSvnCommandTestBase {
@Rule

View File

@@ -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());

View File

@@ -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();
}