Class DirectorySnapshotTest

java.lang.Object
org.jumpmind.symmetric.file.DirectorySnapshotTest

public class DirectorySnapshotTest extends Object
  • Constructor Details

    • DirectorySnapshotTest

      public DirectorySnapshotTest()
  • Method Details

    • setupBeforeAll

      @BeforeAll public static void setupBeforeAll()
    • testDiff_FileNotInTarget_AcceptChange

      @ParameterizedTest @ValueSource(strings={"C","M"}) public void testDiff_FileNotInTarget_AcceptChange(String lastEventTypeCode)
      File change in the source snapshot; The target directory snapshot (which is missing this file) must detect this change as same type.
    • testDiff_FileNotInTarget_DropDeleteChange

      @Test public void testDiff_FileNotInTarget_DropDeleteChange()
      A delete in the source snapshot; The target directory snapshot (which is missing this file) must ignore this change.
    • testDiff_FileIsInTarget_NoRealChange

      @ParameterizedTest @ValueSource(strings={"C","M","D"}) public void testDiff_FileIsInTarget_NoRealChange(String lastEventTypeCode)
      File in the source snapshot; The target directory snapshot (which has same file) must ignore == no real change. strings = { "C", "M","D" })
    • testDiff_SameFileIsInTarget_CreateFlipsToModify

      @Test public void testDiff_SameFileIsInTarget_CreateFlipsToModify()
      File CREATEd in the source snapshot; The target directory snapshot (which has same file as MODIFY, but different size) must flip both to MODIFIED.
    • testDiff_FileIsInTarget_NoChange

      @ParameterizedTest @ValueSource(strings={"C","M"}) public void testDiff_FileIsInTarget_NoChange(String lastEventTypeCode)
      Source snapshot is empty; The target directory snapshot (which has file changes CREATE/MODIFY) must report 1 difference as DELETE.
    • testDiff_FileIsInTargetAs_NoDeleteChange

      @Test public void testDiff_FileIsInTargetAs_NoDeleteChange()
      Source snapshot is empty; The target directory snapshot (which has file change as DELETE) must report no differences.
    • testDiff_LotsOfFilesAndFewChanges

      @Test public void testDiff_LotsOfFilesAndFewChanges()
      Source and target have lots of files with same names and only 5 differences in ModifiedTime. Time the diff() method!