|
|
@@ -12,7 +12,6 @@ using Avalonia.Data;
|
|
|
using Avalonia.Input;
|
|
|
using Avalonia.Input.Platform;
|
|
|
using Avalonia.Interactivity;
|
|
|
-using Avalonia.Platform;
|
|
|
using Avalonia.UnitTests;
|
|
|
using Moq;
|
|
|
using Xunit;
|
|
|
@@ -704,7 +703,7 @@ namespace Avalonia.Controls.UnitTests.Primitives
|
|
|
[Fact]
|
|
|
public void Shift_Selecting_From_No_Selection_Selects_From_Start()
|
|
|
{
|
|
|
- using (UnitTestApplication.Start(new TestServices(threadingInterface: Mock.Of<IPlatformThreadingInterface>(x => x.CurrentThreadIsLoopThread == true))))
|
|
|
+ using (UnitTestApplication.Start())
|
|
|
{
|
|
|
var target = new ListBox
|
|
|
{
|
|
|
@@ -727,7 +726,7 @@ namespace Avalonia.Controls.UnitTests.Primitives
|
|
|
[Fact]
|
|
|
public void Ctrl_Selecting_Raises_SelectionChanged_Events()
|
|
|
{
|
|
|
- using (UnitTestApplication.Start(new TestServices(threadingInterface: Mock.Of<IPlatformThreadingInterface>(x => x.CurrentThreadIsLoopThread == true))))
|
|
|
+ using (UnitTestApplication.Start())
|
|
|
{
|
|
|
var target = new ListBox
|
|
|
{
|
|
|
@@ -781,7 +780,7 @@ namespace Avalonia.Controls.UnitTests.Primitives
|
|
|
[Fact]
|
|
|
public void Ctrl_Selecting_SelectedItem_With_Multiple_Selection_Active_Sets_SelectedItem_To_Next_Selection()
|
|
|
{
|
|
|
- using (UnitTestApplication.Start(new TestServices(threadingInterface: Mock.Of<IPlatformThreadingInterface>(x => x.CurrentThreadIsLoopThread == true))))
|
|
|
+ using (UnitTestApplication.Start())
|
|
|
{
|
|
|
var target = new ListBox
|
|
|
{
|
|
|
@@ -811,7 +810,7 @@ namespace Avalonia.Controls.UnitTests.Primitives
|
|
|
[Fact]
|
|
|
public void Ctrl_Selecting_Non_SelectedItem_With_Multiple_Selection_Active_Leaves_SelectedItem_The_Same()
|
|
|
{
|
|
|
- using (UnitTestApplication.Start(new TestServices(threadingInterface: Mock.Of<IPlatformThreadingInterface>(x => x.CurrentThreadIsLoopThread == true))))
|
|
|
+ using (UnitTestApplication.Start())
|
|
|
{
|
|
|
var target = new ListBox
|
|
|
{
|
|
|
@@ -839,7 +838,7 @@ namespace Avalonia.Controls.UnitTests.Primitives
|
|
|
[Fact]
|
|
|
public void Should_Ctrl_Select_Correct_Item_When_Duplicate_Items_Are_Present()
|
|
|
{
|
|
|
- using (UnitTestApplication.Start(new TestServices(threadingInterface: Mock.Of<IPlatformThreadingInterface>(x => x.CurrentThreadIsLoopThread == true))))
|
|
|
+ using (UnitTestApplication.Start())
|
|
|
{
|
|
|
var target = new ListBox
|
|
|
{
|
|
|
@@ -863,7 +862,7 @@ namespace Avalonia.Controls.UnitTests.Primitives
|
|
|
[Fact]
|
|
|
public void Should_Shift_Select_Correct_Item_When_Duplicates_Are_Present()
|
|
|
{
|
|
|
- using (UnitTestApplication.Start(new TestServices(threadingInterface: Mock.Of<IPlatformThreadingInterface>(x => x.CurrentThreadIsLoopThread == true))))
|
|
|
+ using (UnitTestApplication.Start())
|
|
|
{
|
|
|
var target = new ListBox
|
|
|
{
|
|
|
@@ -887,7 +886,7 @@ namespace Avalonia.Controls.UnitTests.Primitives
|
|
|
[Fact]
|
|
|
public void Can_Shift_Select_All_Items_When_Duplicates_Are_Present()
|
|
|
{
|
|
|
- using (UnitTestApplication.Start(new TestServices(threadingInterface: Mock.Of<IPlatformThreadingInterface>(x => x.CurrentThreadIsLoopThread == true))))
|
|
|
+ using (UnitTestApplication.Start())
|
|
|
{
|
|
|
var target = new ListBox
|
|
|
{
|
|
|
@@ -911,7 +910,7 @@ namespace Avalonia.Controls.UnitTests.Primitives
|
|
|
[Fact]
|
|
|
public void Shift_Selecting_Raises_SelectionChanged_Events()
|
|
|
{
|
|
|
- using (UnitTestApplication.Start(new TestServices(threadingInterface: Mock.Of<IPlatformThreadingInterface>(x => x.CurrentThreadIsLoopThread == true))))
|
|
|
+ using (UnitTestApplication.Start())
|
|
|
{
|
|
|
var target = new ListBox
|
|
|
{
|
|
|
@@ -960,7 +959,7 @@ namespace Avalonia.Controls.UnitTests.Primitives
|
|
|
[Fact]
|
|
|
public void Duplicate_Items_Are_Added_To_SelectedItems_In_Order()
|
|
|
{
|
|
|
- using (UnitTestApplication.Start(new TestServices(threadingInterface: Mock.Of<IPlatformThreadingInterface>(x => x.CurrentThreadIsLoopThread == true))))
|
|
|
+ using (UnitTestApplication.Start())
|
|
|
{
|
|
|
var target = new ListBox
|
|
|
{
|
|
|
@@ -1190,7 +1189,7 @@ namespace Avalonia.Controls.UnitTests.Primitives
|
|
|
[Fact]
|
|
|
public void Left_Click_On_SelectedItem_Should_Clear_Existing_Selection()
|
|
|
{
|
|
|
- using (UnitTestApplication.Start(new TestServices(threadingInterface: Mock.Of<IPlatformThreadingInterface>(x => x.CurrentThreadIsLoopThread == true))))
|
|
|
+ using (UnitTestApplication.Start())
|
|
|
{
|
|
|
var target = new ListBox
|
|
|
{
|
|
|
@@ -1217,7 +1216,7 @@ namespace Avalonia.Controls.UnitTests.Primitives
|
|
|
[Fact]
|
|
|
public void Right_Click_On_SelectedItem_Should_Not_Clear_Existing_Selection()
|
|
|
{
|
|
|
- using (UnitTestApplication.Start(new TestServices(threadingInterface: Mock.Of<IPlatformThreadingInterface>(x => x.CurrentThreadIsLoopThread == true))))
|
|
|
+ using (UnitTestApplication.Start())
|
|
|
{
|
|
|
var target = new ListBox
|
|
|
{
|
|
|
@@ -1242,7 +1241,7 @@ namespace Avalonia.Controls.UnitTests.Primitives
|
|
|
[Fact]
|
|
|
public void Right_Click_On_UnselectedItem_Should_Clear_Existing_Selection()
|
|
|
{
|
|
|
- using (UnitTestApplication.Start(new TestServices(threadingInterface: Mock.Of<IPlatformThreadingInterface>(x => x.CurrentThreadIsLoopThread == true))))
|
|
|
+ using (UnitTestApplication.Start())
|
|
|
{
|
|
|
var target = new ListBox
|
|
|
{
|
|
|
@@ -1294,7 +1293,7 @@ namespace Avalonia.Controls.UnitTests.Primitives
|
|
|
[Fact]
|
|
|
public void Shift_Right_Click_Should_Not_Select_Multiple()
|
|
|
{
|
|
|
- using (UnitTestApplication.Start(new TestServices(threadingInterface: Mock.Of<IPlatformThreadingInterface>(x => x.CurrentThreadIsLoopThread == true))))
|
|
|
+ using (UnitTestApplication.Start())
|
|
|
{
|
|
|
var target = new ListBox
|
|
|
{
|
|
|
@@ -1317,7 +1316,7 @@ namespace Avalonia.Controls.UnitTests.Primitives
|
|
|
[Fact]
|
|
|
public void Ctrl_Right_Click_Should_Not_Select_Multiple()
|
|
|
{
|
|
|
- using (UnitTestApplication.Start(new TestServices(threadingInterface: Mock.Of<IPlatformThreadingInterface>(x => x.CurrentThreadIsLoopThread == true))))
|
|
|
+ using (UnitTestApplication.Start())
|
|
|
{
|
|
|
var target = new ListBox
|
|
|
{
|