mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-12-24 01:09:48 +01:00
Add table to diff view
Pushed-by: Florian Scholdei<florian.scholdei@cloudogu.com> Pushed-by: Viktor Egorov<viktor.egorov-extern@cloudogu.com> Pushed-by: k8s-git-ops<admin@cloudogu.com> Committed-by: Thomas Zerr<thomas.zerr@cloudogu.com> Co-authored-by: Viktor<viktor.egorov@triology.de> Co-authored-by: Thomas Zerr<thomas.zerr@cloudogu.com> Pushed-by: Thomas Zerr<thomas.zerr@cloudogu.com>
This commit is contained in:
@@ -33,8 +33,10 @@ import sonia.scm.repository.api.IgnoreWhitespaceLevel;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.Iterator;
|
||||
import java.util.Optional;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.InstanceOfAssertFactories.OPTIONAL;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class GitDiffResultCommandTest extends AbstractGitCommandTestBase {
|
||||
@@ -189,6 +191,15 @@ public class GitDiffResultCommandTest extends AbstractGitCommandTestBase {
|
||||
assertThat(diffResult.getStatistics()).get().extracting("added").isEqualTo(0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldCreateFileTree() throws IOException {
|
||||
DiffResult.DiffTreeNode root = DiffResult.DiffTreeNode.createRootNode();
|
||||
root.addChild("a.txt", DiffFile.ChangeType.MODIFY);
|
||||
root.addChild("b.txt", DiffFile.ChangeType.DELETE);
|
||||
DiffResult diffResult = createDiffResult("3f76a12f08a6ba0dc988c68b7f0b2cd190efc3c4");
|
||||
assertEquals(Optional.of(root),diffResult.getDiffTree());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldNotIgnoreWhiteSpace() throws IOException {
|
||||
GitDiffResultCommand gitDiffResultCommand = new GitDiffResultCommand(createContext());
|
||||
|
||||
Reference in New Issue
Block a user