示例#1
0
    def test_regular(self):
        actual = Target(
            children=[
                Input(
                    Mock(),
                    children=[Mock()]
                ),
                Output(Mock(), children=[Mock()]),
                Goto()
            ]
        )

        folder = Folder(
            children=[actual]
        )
        dialog = Mock()
        folder._set_dialog(dialog)

        self.assertEqual(
            dialog,
            actual.children[0].dialog
        )
        self.assertEqual(
            dialog,
            actual.children[1].dialog
        )
        self.assertEqual(
            dialog,
            actual.children[2].dialog
        )
示例#2
0
    def test_regular(self):
        actual = Target(
            Prompt(
                items=[Mock()]
            ),
            children=[
                Action("var_name_value", "operator_value"),
                Goto()
            ]
        )

        folder = Folder(
            children=[actual]
        )
        dialog = Mock()
        folder._set_dialog(dialog)

        self.assertEqual(
            dialog,
            actual.children[0].dialog
        )
        self.assertEqual(
            dialog,
            actual.children[1].dialog
        )
        self.assertEqual(
            dialog,
            actual.children[2].dialog
        )
示例#3
0
    def test_regular(self):
        actual = Target(
            Mock(),
            children=[
                Grammar(watson_items=[Mock()]),
                Action(var_name="var_name_value", operator="operator_value"),
                Goto()
            ]
        )

        folder = Folder(
            children=[actual]
        )
        dialog = Mock()
        folder._set_dialog(dialog)

        self.assertEqual(
            dialog,
            actual.children[0].dialog
        )
        self.assertEqual(
            dialog,
            actual.children[1].dialog
        )
        self.assertEqual(
            dialog,
            actual.children[2].dialog
        )
示例#4
0
    def test_regular(self):
        actual = Target(
            Prompt(items=[Mock()]),
            children=[Action("var_name_value", "operator_value"),
                      Goto()])

        folder = Folder(children=[actual])
        dialog = Mock()
        folder._set_dialog(dialog)

        self.assertEqual(dialog, actual.children[0].dialog)
        self.assertEqual(dialog, actual.children[1].dialog)
        self.assertEqual(dialog, actual.children[2].dialog)
示例#5
0
    def test_regular(self):
        actual = Target(children=[
            Input(Mock(), children=[Mock()]),
            Output(Mock(), children=[Mock()]),
            Goto()
        ])

        folder = Folder(children=[actual])
        dialog = Mock()
        folder._set_dialog(dialog)

        self.assertEqual(dialog, actual.children[0].dialog)
        self.assertEqual(dialog, actual.children[1].dialog)
        self.assertEqual(dialog, actual.children[2].dialog)
示例#6
0
    def test_regular(self):
        actual = Target(Mock(),
                        children=[
                            Grammar(watson_items=[Mock()]),
                            Action(var_name="var_name_value",
                                   operator="operator_value"),
                            Goto()
                        ])

        folder = Folder(children=[actual])
        dialog = Mock()
        folder._set_dialog(dialog)

        self.assertEqual(dialog, actual.children[0].dialog)
        self.assertEqual(dialog, actual.children[1].dialog)
        self.assertEqual(dialog, actual.children[2].dialog)