Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 49991b2

Browse files
author
Meaghan Lewis
committed
update two factor tests to use apartment attribute
1 parent 2776548 commit 49991b2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/UnitTests/GitHub.UI/TwoFactorInputTests.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.Collections.Generic;
22
using System.Linq;
3+
using System.Threading;
34
using System.Windows;
45
using System.Windows.Controls;
56
using GitHub.UI;
@@ -9,7 +10,8 @@ public class TwoFactorInputTests
910
{
1011
public class TheTextProperty : TestBaseClass
1112
{
12-
[Test]
13+
14+
[Test, Apartment(ApartmentState.STA)]
1315
public void SetsTextBoxesToIndividualCharacters()
1416
{
1517
var twoFactorInput = new TwoFactorInput();
@@ -26,7 +28,7 @@ public void SetsTextBoxesToIndividualCharacters()
2628
Assert.That("5", Is.EqualTo(textBoxes[5].Text));
2729
}
2830

29-
[Test]
31+
[Test, Apartment(ApartmentState.STA)]
3032
public void IgnoresNonDigitCharacters()
3133
{
3234
var twoFactorInput = new TwoFactorInput();
@@ -43,7 +45,7 @@ public void IgnoresNonDigitCharacters()
4345
Assert.That("5", Is.EqualTo(textBoxes[5].Text));
4446
}
4547

46-
[Test]
48+
[Test, Apartment(ApartmentState.STA)]
4749
public void HandlesNotEnoughCharacters()
4850
{
4951
var twoFactorInput = new TwoFactorInput();
@@ -60,7 +62,7 @@ public void HandlesNotEnoughCharacters()
6062
Assert.That("", Is.EqualTo(textBoxes[5].Text));
6163
}
6264

63-
[TestCase(null, null)]
65+
[TestCase(null, null), Apartment(ApartmentState.STA)]
6466
[TestCase("", "")]
6567
[TestCase("xxxx", "")]
6668
public void HandlesNullAndStringsWithNoDigits(string input, string expected)

0 commit comments

Comments
 (0)