Skip to content

Commit

Permalink
Merge pull request #172 from Youssef1313/fix-exception
Browse files Browse the repository at this point in the history
fix: Fix exception when setting CurrentTestWindow
  • Loading branch information
dr1rrb authored Mar 18, 2024
2 parents 08becaa + 57f1164 commit 26154bd
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,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 @@ -74,11 +73,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 26154bd

Please sign in to comment.