Ejemplo n.º 1
0
    public async Task Hierarchy2(bool forward)
    {
        var tester = new HierarchyTester();

        var block1 = tester.RootBlock;
        var block2 = tester.CreateDummyBlock();
        var block3 = tester.CreateDummyBlock();

        var blockNode1 = HierarchyTester.CreateNode("blockNode1", block2);
        var blockNode2 = HierarchyTester.CreateNode("blockNode2", block3);
        var pause1     = HierarchyTester.CreatePauseNode("pause1");
        var pause2     = HierarchyTester.CreatePauseNode("pause2");
        var pause3     = HierarchyTester.CreatePauseNode("pause3");

        tester.MoveWithArgs(forward, block1).MustReturn(blockNode1, blockNode2, null);
        tester.MoveWithArgs(forward, block2).MustReturn(pause1, null);
        tester.MoveWithArgs(forward, block3).MustReturn(pause2, pause3, null);

        await tester.MoveAsync(forward, pause1);

        await tester.MoveAsync(forward, pause2);

        await tester.MoveAsync(forward, pause3);

        await tester.MoveAsync(forward, null);
    }
Ejemplo n.º 2
0
    public async Task EmptyWithTester(bool forward)
    {
        var tester = new HierarchyTester();

        tester.ConfigureMove(forward, null);
        await tester.MoveAsync(forward, null);
    }
Ejemplo n.º 3
0
    public async Task Hierarchy1(bool forward)
    {
        var tester = new HierarchyTester();

        var block1 = tester.RootBlock;
        var block2 = tester.CreateDummyBlock();

        var node1 = HierarchyTester.CreateNode("node1", block2);
        var node2 = HierarchyTester.CreatePauseNode("node2");

        tester.MoveWithArgs(forward, block1).MustReturn(node1, null);
        tester.MoveWithArgs(forward, block2).MustReturn(node2, null);

        await tester.MoveAsync(forward, node2);

        await tester.MoveAsync(forward, null);
    }