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

Commit ebb900e

Browse files
committed
add setup for unit tests in AssemblyInfo
1 parent 8339798 commit ebb900e

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

test/GitHub.App.UnitTests/Properties/AssemblyInfo.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Reflection;
1+
using NUnit.Framework;
2+
using System.Reflection;
23
using System.Runtime.CompilerServices;
34
using System.Runtime.InteropServices;
45

@@ -34,3 +35,13 @@
3435
// [assembly: AssemblyVersion("1.0.*")]
3536
[assembly: AssemblyVersion("1.0.0.0")]
3637
[assembly: AssemblyFileVersion("1.0.0.0")]
38+
39+
[SetUpFixture]
40+
public class MySetUpClass
41+
{
42+
[OneTimeSetUp]
43+
public void RunBeforeAnyTests()
44+
{
45+
Splat.ModeDetector.Current.SetInUnitTestRunner(true);
46+
}
47+
}

test/GitHub.VisualStudio.UnitTests/Properties/AssemblyInfo.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Reflection;
1+
using NUnit.Framework;
2+
using System.Reflection;
23
using System.Runtime.CompilerServices;
34
using System.Runtime.InteropServices;
45

@@ -34,3 +35,13 @@
3435
// [assembly: AssemblyVersion("1.0.*")]
3536
[assembly: AssemblyVersion("1.0.0.0")]
3637
[assembly: AssemblyFileVersion("1.0.0.0")]
38+
39+
[SetUpFixture]
40+
public class MySetUpClass
41+
{
42+
[OneTimeSetUp]
43+
public void RunBeforeAnyTests()
44+
{
45+
Splat.ModeDetector.Current.SetInUnitTestRunner(true);
46+
}
47+
}

0 commit comments

Comments
 (0)