Skip to content

Commit

Permalink
fix: Fix exception when setting CurrentTestWindow
Browse files Browse the repository at this point in the history
  • Loading branch information
Youssef1313 committed Mar 16, 2024
1 parent 6c3ce9e commit 57f1164
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ namespace Uno.UI.RuntimeTests;

public static class UnitTestsUIContentHelper
{
private static Window? _currentTestWindow;
private static UIElement? _originalWindowContent;

internal static (UIElement Control, Func<UIElement?> GetContent, Action<UIElement?> SetContent) EmbeddedTestRoot { get; set; }
Expand Down Expand Up @@ -75,11 +74,7 @@ public static void RestoreOriginalContent()
}
}

public static Window? CurrentTestWindow
{
get => _currentTestWindow ?? throw new InvalidOperationException("Current test window not set.");
set => _currentTestWindow = value;
}
public static Window? CurrentTestWindow { get; set; }

public static UIElement? Content
{
Expand Down

0 comments on commit 57f1164

Please sign in to comment.