Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Controls/src/Core/Items/ItemsView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public int RemainingItemsThreshold

internal static readonly BindableProperty InternalItemsLayoutProperty =
BindableProperty.Create(nameof(ItemsLayout), typeof(IItemsLayout), typeof(ItemsView),
null, propertyChanged: OnInternalItemsLayoutPropertyChanged,
null, propertyChanged: OnInternalItemsLayoutPropertyChanged,
defaultValueCreator: (b) => LinearItemsLayout.CreateVerticalDefault());

static void OnInternalItemsLayoutPropertyChanged(BindableObject bindable, object oldValue, object newValue)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public void HorizontalListShouldReturnLinearItemsLayout()
{
var converter = new ItemsLayoutTypeConverter();
var result = converter.ConvertFromInvariantString("HorizontalList");

Assert.IsType<LinearItemsLayout>(result);
var linearLayout = (LinearItemsLayout)result;
Assert.Equal(ItemsLayoutOrientation.Horizontal, linearLayout.Orientation);
Expand All @@ -22,7 +22,7 @@ public void VerticalListShouldReturnLinearItemsLayout()
{
var converter = new ItemsLayoutTypeConverter();
var result = converter.ConvertFromInvariantString("VerticalList");

Assert.IsType<LinearItemsLayout>(result);
var linearLayout = (LinearItemsLayout)result;
Assert.Equal(ItemsLayoutOrientation.Vertical, linearLayout.Orientation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ await InvokeOnMainThreadAsync(async () =>
weakCarouselView = new WeakReference(carouselView);

var handler = await CreateHandlerAsync<CarouselViewHandler2>(carouselView);

// Verify handler is created
Assert.NotNull(handler);

// Store weak reference to the handler
weakHandler = new WeakReference(handler);

// Disconnect the handler
((IElementHandler)handler).DisconnectHandler();
});
Expand All @@ -46,7 +46,7 @@ await InvokeOnMainThreadAsync(async () =>

// Verify the CarouselView was collected
Assert.False(weakCarouselView.IsAlive, "CarouselView should have been garbage collected");

// Verify the handler was collected
Assert.False(weakHandler.IsAlive, "CarouselViewHandler2 should have been garbage collected");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,13 +271,13 @@ await InvokeOnMainThreadAsync(async () =>
weakCollectionView = new WeakReference(collectionView);

var handler = await CreateHandlerAsync<CollectionViewHandler2>(collectionView);

// Verify handler is created
Assert.NotNull(handler);

// Store weak reference to the handler
weakHandler = new WeakReference(handler);

// Disconnect the handler
((IElementHandler)handler).DisconnectHandler();
});
Expand All @@ -287,7 +287,7 @@ await InvokeOnMainThreadAsync(async () =>

// Verify the CollectionView was collected
Assert.False(weakCollectionView.IsAlive, "CollectionView should have been garbage collected");

// Verify the handler was collected
Assert.False(weakHandler.IsAlive, "CollectionViewHandler2 should have been garbage collected");
}
Expand Down