testTransformChildSequenceInsert :: TestTree
testTransformChildSequenceInsert =
  let dop1 = O.DirectedOperation "3/foo" $ O.IntInc 1
      dop2 = O.DirectedOperation "foo/bar" $ O.IntInc 1
      dop3 = O.DirectedOperation "" $ O.IntInc 1
      dop4 = O.DirectedOperation "4/foo" $ O.IntInc 1
      ss1 = O.DirectedOperation "" $ O.SequenceInsert 2 c 0
      ss2 = O.DirectedOperation "" $ O.SequenceInsert 3 c 0
      ss3 = O.DirectedOperation "" $ O.SequenceInsert 4 c 0 in
  testCase "Transform Child against SequenceSet" $ do
    assertEqual "a" (Just dop4) $ T.transformDirected dop1 ss1 T.Left
    assertEqual "b" (Just dop4) $ T.transformDirected dop1 ss1 T.Right
    assertEqual "c" (Just dop4) $ T.transformDirected dop1 ss2 T.Left
    assertEqual "d" (Just dop4) $ T.transformDirected dop1 ss2 T.Right
    assertEqual "e" (Just dop1) $ T.transformDirected dop1 ss3 T.Left
    assertEqual "f" (Just dop1) $ T.transformDirected dop1 ss3 T.Right
    assertEqual "g" Nothing $ T.transformDirected dop2 ss1 T.Left
    assertEqual "h" Nothing $ T.transformDirected dop2 ss1 T.Right
    assertEqual "i" Nothing $ T.transformDirected dop3 ss1 T.Left
    assertEqual "j" Nothing $ T.transformDirected dop3 ss1 T.Right
testTransformChildSequenceInsert :: TestTree
testTransformChildSequenceInsert =
  let dop1 = O.DirectedOperation "3/foo" $ O.IntInc 1
      dop2 = O.DirectedOperation "foo/bar" $ O.IntInc 1
      dop3 = O.DirectedOperation "" $ O.IntInc 1
      dop4 = O.DirectedOperation "4/foo" $ O.IntInc 1
      ss1 = O.DirectedOperation "" $ O.SequenceInsert 2 c 0
      ss2 = O.DirectedOperation "" $ O.SequenceInsert 3 c 0
      ss3 = O.DirectedOperation "" $ O.SequenceInsert 4 c 0 in
  testCase "Transform Child against SequenceSet" $ do
    assertEqual "a" (Just dop4) $ T.transformDirected dop1 ss1 T.Left
    assertEqual "b" (Just dop4) $ T.transformDirected dop1 ss1 T.Right
    assertEqual "c" (Just dop4) $ T.transformDirected dop1 ss2 T.Left
    assertEqual "d" (Just dop4) $ T.transformDirected dop1 ss2 T.Right
    assertEqual "e" (Just dop1) $ T.transformDirected dop1 ss3 T.Left
    assertEqual "f" (Just dop1) $ T.transformDirected dop1 ss3 T.Right
    assertEqual "g" Nothing $ T.transformDirected dop2 ss1 T.Left
    assertEqual "h" Nothing $ T.transformDirected dop2 ss1 T.Right
    assertEqual "i" Nothing $ T.transformDirected dop3 ss1 T.Left
    assertEqual "j" Nothing $ T.transformDirected dop3 ss1 T.Right
testTransformChildSequenceInsert =
  let dop1 = O.DirectedOperation "3/foo" $ O.IntInc 1
      dop2 = O.DirectedOperation "foo/bar" $ O.IntInc 1
      dop3 = O.DirectedOperation "" $ O.IntInc 1
      dop4 = O.DirectedOperation "4/foo" $ O.IntInc 1
      ss1 = O.DirectedOperation "" $ O.SequenceInsert 2 c 0
      ss2 = O.DirectedOperation "" $ O.SequenceInsert 3 c 0
      ss3 = O.DirectedOperation "" $ O.SequenceInsert 4 c 0 in
  testCase "Transform Child against SequenceSet" $ do
    assertEqual "a" (Just dop4) $ T.transformDirected dop1 ss1 T.Left
    assertEqual "b" (Just dop4) $ T.transformDirected dop1 ss1 T.Right
    assertEqual "c" (Just dop4) $ T.transformDirected dop1 ss2 T.Left
    assertEqual "d" (Just dop4) $ T.transformDirected dop1 ss2 T.Right
    assertEqual "e" (Just dop1) $ T.transformDirected dop1 ss3 T.Left
    assertEqual "f" (Just dop1) $ T.transformDirected dop1 ss3 T.Right
    assertEqual "g" Nothing $ T.transformDirected dop2 ss1 T.Left
    assertEqual "h" Nothing $ T.transformDirected dop2 ss1 T.Right
    assertEqual "i" Nothing $ T.transformDirected dop3 ss1 T.Left
    assertEqual "j" Nothing $ T.transformDirected dop3 ss1 T.Right