Package playRepository

Examples of playRepository.FileDiff$Hunks


public class FileDiffTest {
    @Test
    public void getHunks() throws IOException {
        // given
        FileDiff fileDiff = new FileDiff();
        fileDiff.a = new RawText("apple\nbanana\ncat\n".getBytes());
        fileDiff.b = new RawText("apple\nbanana\ncorn\n".getBytes());
        DiffAlgorithm diffAlgorithm =
                DiffAlgorithm.getAlgorithm(DiffAlgorithm.SupportedAlgorithm.HISTOGRAM);
        fileDiff.editList = diffAlgorithm.diff(RawTextComparator.DEFAULT, fileDiff.a,
                        fileDiff.b);

        // when
        List<Hunk> hunks = fileDiff.getHunks();

        // then
        Hunk expectedHunk = new Hunk();
        expectedHunk.beginA = 0;
        expectedHunk.endA = 3;
View Full Code Here

TOP

Related Classes of playRepository.FileDiff$Hunks

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.