flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mih...@apache.org
Subject [2/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-34885 Making sure that the changes for this ticket haven't introduced the bug of removing a null from the collection when an item's Bindable property changes. Looks all right.
Date Tue, 01 Mar 2016 12:56:35 GMT
FLEX-34885
Making sure that the changes for this ticket haven't introduced the bug of removing a null
from the collection when an item's Bindable property changes. Looks all right.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/cccf3a46
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/cccf3a46
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/cccf3a46

Branch: refs/heads/develop
Commit: cccf3a468e6c5f65b01b580bb9456d7f756e48e2
Parents: 4b4cc0b
Author: Mihai Chira <mihaic@apache.org>
Authored: Tue Mar 1 12:58:03 2016 +0100
Committer: Mihai Chira <mihaic@apache.org>
Committed: Tue Mar 1 12:58:03 2016 +0100

----------------------------------------------------------------------
 ...stCollectionView_PropertyChangeEvent_Tests.as | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/cccf3a46/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
b/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
index c7d684b..35ba4cc 100644
--- a/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
+++ b/frameworks/projects/framework/tests/mx/collections/ListCollectionView_PropertyChangeEvent_Tests.as
@@ -155,6 +155,25 @@ package mx.collections {
         }
 
         [Test]
+        public function test_when_collection_item_is_changed_null_is_not_removed_from_list():void
+        {
+            //given
+            _sut.addItem(null);
+            _sut.filterFunction = allowAll;
+            _sut.refresh();
+            const positionOfNull:int = _sut.getItemIndex(null);
+            const positionOfFirstWorkout:int = _sut.getItemIndex(_firstWorkout);
+
+            //when
+            _firstWorkout.duration += 10;
+
+            //then
+            assertTrue(positionOfNull != -1);
+            assertEquals(positionOfNull, _sut.getItemIndex(null));
+            assertEquals(positionOfFirstWorkout, _sut.getItemIndex(_firstWorkout));
+        }
+
+        [Test]
         public function test_when_collection_item_dispatches_PropertyChangeEvent_with_UPDATE_null_is_removed_from_list():void
         {
             //given


Mime
View raw message