-
Notifications
You must be signed in to change notification settings - Fork 742
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(test): Add runtime tests automatic retry support
- Loading branch information
1 parent
35e40d4
commit 8919f17
Showing
4 changed files
with
163 additions
and
93 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
42 changes: 42 additions & 0 deletions
42
src/Uno.UI.RuntimeTests/Tests/UnitTestsTests/Given_UnitTest.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,42 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
namespace Uno.UI.RuntimeTests.Tests.UnitTestsTests | ||
{ | ||
[TestClass] | ||
class Given_UnitTest | ||
{ | ||
static int When_UnhandledException_Count = 0; | ||
|
||
[TestMethod] | ||
public void When_UnhandledException() | ||
{ | ||
if (When_UnhandledException_Count++ < 2) | ||
{ | ||
throw new InvalidOperationException(); | ||
} | ||
} | ||
} | ||
|
||
[TestClass] | ||
class Given_UnitTest_Initialize | ||
{ | ||
static int Initialize_Count = 0; | ||
|
||
[TestInitialize] | ||
public void Initialize() | ||
{ | ||
if (Initialize_Count++ < 2) | ||
{ | ||
throw new InvalidOperationException(); | ||
} | ||
} | ||
|
||
[TestMethod] | ||
public void When_Success() | ||
{ | ||
} | ||
} | ||
} |
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