Skip to content

Commit

Permalink
feat(diff): add test case for DiffSimplifier
Browse files Browse the repository at this point in the history
Add a new test case to verify the functionality of the DiffSimplifier class. The test case includes setting up the necessary dependencies and calling the simplify method with a list of changes and ignore file patterns. Assertions can be added to verify the simplified diff.
  • Loading branch information
phodal committed Jan 11, 2024
1 parent ddf4ad0 commit f6dde52
Showing 1 changed file with 23 additions and 0 deletions.
@@ -0,0 +1,23 @@
package cc.unitmesh.devti.prompting.diff;

import com.intellij.openapi.vcs.changes.Change
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixture4TestCase
import java.nio.file.PathMatcher

class DiffSimplifierTest : LightPlatformCodeInsightFixture4TestCase() {
private lateinit var diffSimplifier: DiffSimplifier

override fun setUp() {
super.setUp()
diffSimplifier = DiffSimplifier(project)
}

fun testSimplify() {
val changes = listOf<Change>() // Add test changes here
val ignoreFilePatterns = listOf<PathMatcher>() // Add test ignore file patterns here

val simplifiedDiff = diffSimplifier.simplify(changes, ignoreFilePatterns)

// Add assertions here to verify the simplified diff
}
}

0 comments on commit f6dde52

Please sign in to comment.