Ejemplo n.º 1
0
 def test_ItemRemoved(self):
     c = ObservableCollection(1,2,3,4)
     t = self.Tester()
     c.ItemRemoved += t.handle_event
     c.remove(1)
     assert t.Kwargs['collection'] == c
     assert t.Args == (1,0)
Ejemplo n.º 2
0
 def test_ItemRemoved(self):
     c = ObservableCollection(1, 2, 3, 4)
     t = self.Tester()
     c.ItemRemoved += t.handle_event
     c.remove(1)
     assert t.Kwargs['collection'] == c
     assert t.Args == (1, 0)
Ejemplo n.º 3
0
 def test_CollectionChanged_remove(self):
     c = ObservableCollection(1,2,3,4,5,6,7,8,9,10)
     t = self.Tester()
     c.CollectionChanged += t.handle_event
     c.remove(1)
     assert t.Kwargs['collection'] == c
Ejemplo n.º 4
0
 def test_base_binding_auto_update_remove(self):
     t = TestTarget()
     c = ObservableCollection(1,2,3,4,5,6,7,8,9,10)
     t << c
     c.remove(5)
     assert t.Values == (1,2,3,4,6,7,8,9,10)
Ejemplo n.º 5
0
 def test_CollectionChanged_remove(self):
     c = ObservableCollection(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
     t = self.Tester()
     c.CollectionChanged += t.handle_event
     c.remove(1)
     assert t.Kwargs['collection'] == c
Ejemplo n.º 6
0
 def test_base_binding_auto_update_remove(self):
     t = TestTarget()
     c = ObservableCollection(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
     t << c
     c.remove(5)
     assert t.Values == (1, 2, 3, 4, 6, 7, 8, 9, 10)