Exemple #1
0
 def testDragDropFiles(self):
     form = MainForm()
     fileNames = ["images\\andrzej.jpg", 
                  "images\\michael.jpg"]
     event = Event(containsFiles=True, files=fileNames)
     form.onDragDrop(None, event)
     assertTabPages(form, 2)
Exemple #2
0
 def testFreshFormOpensFiles(self):       
     openFileDialog=MockOpenFileDialog(
         DialogResult = DialogResult.OK,
         FileNames = ["images\\andrzej.jpg", 
                      "images\\michael.jpg"])
     form = MainForm(openFileDialog)
     form.onOpen(None, None)
     assertTabPages(form, 2)
Exemple #3
0
 def testDragFilesEffect(self):
     form = MainForm()
     event = Event(containsFiles = True)
     form.onDragEnter(None, event)
     assert event.Effect == DragDropEffects.Copy
Exemple #4
0
 def testDragNonFilesEffect(self):
     form = MainForm()
     assert form.AllowDrop
     event = Event(containsFiles=False)
     form.onDragEnter(None, event)
     assert event.Effect == DragDropEffects.None        
Exemple #5
0
 def testFreshFormOpensFilesCancelledHasEmptyTabControl(self):
     openFileDialog=MockOpenFileDialog(
         DialogResult = DialogResult.Cancel)
     form = MainForm(openFileDialog)
     form.onOpen(None, None)
     assertTabPages(form, 0)