Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup WinUI to run window scoped tests in new window (#7308)
* Setup WinUI to run window scoped tests in new window * - fix csproj file * - fix namespaces * - fix namespaces
- Loading branch information
Showing
17 changed files
with
132 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/Controls/tests/DeviceTests/Stubs/MauiAppNewWindowStub.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace Microsoft.Maui.DeviceTests.Stubs | ||
{ | ||
class MauiAppNewWindowStub : IApplication | ||
{ | ||
readonly IWindow _window; | ||
|
||
public MauiAppNewWindowStub(IWindow window) | ||
{ | ||
_window = window; | ||
} | ||
|
||
public IReadOnlyList<IWindow> Windows => new List<IWindow>() { _window }; | ||
|
||
public IElementHandler Handler { get; set; } | ||
|
||
public IElement Parent => null; | ||
|
||
public void CloseWindow(IWindow window) | ||
{ | ||
Handler?.Invoke(nameof(IApplication.CloseWindow), window); | ||
} | ||
|
||
public IWindow CreateWindow(IActivationState activationState) | ||
{ | ||
return _window; | ||
} | ||
|
||
public void OpenWindow(IWindow window) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public void ThemeChanged() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.