예제 #1
0
 def OnNewTestCase(self, event):
     dlg = TestCaseNameDialog(self.controller)
     if dlg.ShowModal() == wx.ID_OK:
         self.controller.execute(AddTestCase(dlg.get_name()))
     dlg.Destroy()
예제 #2
0
 def OnNewTestCase(self, event):
     dlg = TestCaseNameDialog(self.controller)
     if dlg.ShowModal() == wx.ID_OK:
         self.controller.execute(AddTestCase(dlg.get_name()))
     dlg.Destroy()
예제 #3
0
 def test_creation(self):
     test_ctrl = file_controller().create_test('A test')
     dlg = TestCaseNameDialog(test_ctrl)
     assert_equal(dlg.get_name(), '')
예제 #4
0
 def test_creation(self):
     test_ctrl = file_controller().create_test('A test')
     dlg = TestCaseNameDialog(test_ctrl)
     assert_equal(dlg.get_name(), '')
예제 #5
0
 def test_case_validator(self):
     test_ctrl = file_controller().create_test('A test')
     dlg = TestCaseNameDialog(test_ctrl, item=test_ctrl.data)
     validator = get_dlg_validators(dlg)[0]
     assert_true(isinstance(validator, TestCaseNameValidator))
예제 #6
0
 def test_validators(self):
     test_ctrl = file_controller().create_test('A test')
     dlg = TestCaseNameDialog(test_ctrl, item=test_ctrl.data)
     assert_equal(len(get_dlg_validators(dlg)), 1)
예제 #7
0
 def test_get_title(self):
     test_ctrl = file_controller().create_test('A test')
     dlg = TestCaseNameDialog(test_ctrl, item=test_ctrl.data)
     assert_equal(dlg.GetTitle(), TestCaseNameDialog._title)
예제 #8
0
 def test_execute(self):
     test_ctrl = file_controller().create_test('A test')
     dlg = TestCaseNameDialog(test_ctrl, item=test_ctrl.data)
     wx.CallAfter(dlg.EndModal, wx.ID_YES)
     assert_equal(dlg.execute(), None)
예제 #9
0
 def test_get_name_item_is_not_none(self):
     test_ctrl = file_controller().create_test('A test')
     dlg = TestCaseNameDialog(test_ctrl, item=test_ctrl.data)
     assert_equal(dlg.get_name(), 'A test')