Skip to content

Commit

Permalink
Fixing tests based on nunit upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Shazwazza committed Mar 5, 2019
1 parent 05a5f60 commit c56edf3
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions src/Examine.Test/PartialTrust/AbstractPartialTrustFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public abstract class AbstractPartialTrustFixture<T> : IPartialTrustFixture
/// for the duration of this test fixture, and a <see cref="PartialTrustHelper{T}"/> which will also
/// survive for the life of the test fixture.
/// </summary>
[SetUp]
[OneTimeSetUp]
protected virtual void FixtureSetup()
{
_partialTrustAppDomain = PartialTrustHelper<T>.CreatePartialTrustDomain();
Expand All @@ -26,7 +26,7 @@ protected virtual void FixtureSetup()
/// <summary>
/// Causes the partial-trust <see cref="AppDomain"/> to be unloaded.
/// </summary>
[TearDown]
[OneTimeTearDown]
protected void FixtureTearDown()
{
AppDomain.Unload(_partialTrustAppDomain);
Expand All @@ -43,7 +43,7 @@ protected void FixtureTearDown()
/// If the test failed in partial trust, it will be marked as failed as normal - including any errors specific
/// to running it in a partial trust environment.
/// </remarks>
[SetUp]
[OneTimeSetUp]
protected void PartialTrustSetup()
{
if (ShouldTestOnlyInFullTrust())
Expand Down Expand Up @@ -84,7 +84,7 @@ private static bool ShouldTestOnlyInFullTrust()
/// This is run once after each test by the NUnit runner. It will cause <see cref="TestTearDown"/> to be
/// run on the derived test class in the partial-trust domain.
/// </summary>
[TearDown]
[OneTimeTearDown]
public void PartialTrustTearDown()
{
if (ShouldTestOnlyInFullTrust())
Expand Down
4 changes: 2 additions & 2 deletions src/Examine.Test/Search/DataTypeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ public void DataTypesTests_Long_Range_SimpleIndexSet()
private static DateTime _reIndexDateTime;
private Lucene.Net.Store.Directory _luceneDir;

[SetUp]
[OneTimeSetUp]
public void TestSetup()
{

Expand All @@ -273,7 +273,7 @@ public void TestSetup()
_searcher = IndexInitializer.GetLuceneSearcher(_luceneDir);
}

[TearDown]
[OneTimeTearDown]
public void TestTearDown()
{
_luceneDir.Dispose();
Expand Down
4 changes: 2 additions & 2 deletions src/Examine.Test/Search/FluentApiTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ public void FluentApiTests_Cws_TextPage_OrderedByNodeName()
#region Initialize and Cleanup


[SetUp]
[OneTimeSetUp]
public void TestSetup()
{
_luceneDir = new RandomIdRAMDirectory();
Expand All @@ -582,7 +582,7 @@ public void TestSetup()
_searcher = IndexInitializer.GetUmbracoSearcher(_luceneDir);
}

[TearDown]
[OneTimeTearDown]
public void TestTearDown()
{
_luceneDir.Dispose();
Expand Down
4 changes: 2 additions & 2 deletions src/Examine.Test/Search/SearchTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void Search_SimpleSearchWithWildcard()

#region Initialize and Cleanup

[SetUp]
[OneTimeSetUp]
public void TestSetup()
{
_luceneDir = new RandomIdRAMDirectory();
Expand All @@ -78,7 +78,7 @@ public void TestSetup()
_searcher = IndexInitializer.GetUmbracoSearcher(_luceneDir);
}

[TearDown]
[OneTimeTearDown]
public void TestTearDown()
{
_luceneDir.Dispose();
Expand Down
4 changes: 2 additions & 2 deletions src/Examine.Test/SimpleDataProviderTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void SimpleDataProviderTest_Range_Search_On_Year()
private static LuceneSearcher _searcher;
private Lucene.Net.Store.Directory _luceneDir;

[SetUp]
[OneTimeSetUp]
public void TestSetup()
{
_luceneDir = new RandomIdRAMDirectory();
Expand All @@ -83,7 +83,7 @@ public void TestSetup()
_searcher = IndexInitializer.GetLuceneSearcher(_luceneDir);
}

[TearDown]
[OneTimeTearDown]
public void TestTearDown()
{
_luceneDir.Dispose();
Expand Down
4 changes: 2 additions & 2 deletions src/Examine.Test/XsltExtensionsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class XsltExtensionsTest //: AbstractPartialTrustFixture<XsltExtensionsTe

#region Initialize and Cleanup

[SetUp]
[OneTimeSetUp]
public void TestSetup()
{
_luceneDir = new RandomIdRAMDirectory();
Expand All @@ -33,7 +33,7 @@ public void TestSetup()
_searcher = IndexInitializer.GetUmbracoSearcher(_luceneDir);
}

[TearDown]
[OneTimeTearDown]
public void TestTearDown()
{
_luceneDir.Dispose();
Expand Down

0 comments on commit c56edf3

Please sign in to comment.