Skip to content

Instantly share code, notes, and snippets.

@stevegreatrex
Created January 4, 2017 06:45
Show Gist options
  • Save stevegreatrex/01a7d7820b1b2b132dce5426e08dcc66 to your computer and use it in GitHub Desktop.
Save stevegreatrex/01a7d7820b1b2b132dce5426e08dcc66 to your computer and use it in GitHub Desktop.
nCrunch Bug Repro
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace nCrunchBugRepro
{
[TestFixture]
[Apartment(ApartmentState.STA)]
public class ExampleFixture
{
[SetUp]
public void TestSetup()
{
if (Thread.CurrentThread.GetApartmentState() != ApartmentState.STA)
Assert.Fail("Apartment state not set");
}
[Test]
public void ExampleTest()
{
Assert.Pass();
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit" version="3.5.0" targetFramework="net452" />
</packages>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment