Skip to content

Commit e03cd1a

Browse files
committed
Removed Xunit namespace from global using directives
This is a bug in my previous commit (c9f6b17). In adding global using directives, the `Xunit` namespace introduced an ambiguity with the `[Collection()]` attribute, which is also used by `OnTopic`. As a result, I removed the `Xunit` namespace. This isn't that big of a deal since, despite there being over twenty files with the `Xunit` namespace, there are far more files in the test project representing POCO objects for testing, and many of those use the `[Collection()]` attribute. This is an amendment to #93. Unfortunately, this got missed as part of the merge (c9f6b17). Whoops.
1 parent c9f6b17 commit e03cd1a

23 files changed

Lines changed: 26 additions & 12 deletions

OnTopic.Tests/AttributeCollectionTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using OnTopic.Attributes;
99
using OnTopic.Collections.Specialized;
1010
using OnTopic.Tests.Entities;
11+
using Xunit;
1112

1213
namespace OnTopic.Tests {
1314

OnTopic.Tests/AttributeValueConverterTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
| Project Topics Library
55
\=============================================================================================================================*/
66
using OnTopic.Attributes;
7+
using Xunit;
78

89
namespace OnTopic.Tests {
910

OnTopic.Tests/ContentTypeDescriptorTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
| Project Topics Library
55
\=============================================================================================================================*/
66
using OnTopic.Metadata;
7+
using Xunit;
78

89
namespace OnTopic.Tests {
910

OnTopic.Tests/ContractTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
| Project Topics Library
55
\=============================================================================================================================*/
66

7+
using Xunit;
8+
79
namespace OnTopic.Tests {
810

911
/*============================================================================================================================

OnTopic.Tests/Fixtures/SharedRepositoryCollection.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
| Project Topics Library
55
\=============================================================================================================================*/
66
using OnTopic.TestDoubles;
7+
using Xunit;
78

89
#pragma warning disable CA1711 // Identifiers should not have incorrect suffix
910

OnTopic.Tests/Fixtures/TopicInfrastructureFixture.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6-
using System.Text;
76
using OnTopic.Data.Caching;
87
using OnTopic.Lookup;
98
using OnTopic.Mapping;
109
using OnTopic.Repositories;
1110
using OnTopic.TestDoubles;
1211
using OnTopic.Tests.TestDoubles;
1312

14-
namespace OnTopic.Tests.Fixtures {
13+
namespace OnTopic.Tests.Fixtures
14+
{
1515

1616
/*============================================================================================================================
1717
| CLASS: TOPIC INFRASTRUCTURE FIXTURE

OnTopic.Tests/Fixtures/TypeAccessorFixture.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,10 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6-
using System.Text;
7-
using OnTopic.Data.Caching;
86
using OnTopic.Internal.Reflection;
9-
using OnTopic.Lookup;
10-
using OnTopic.Mapping;
11-
using OnTopic.Repositories;
12-
using OnTopic.TestDoubles;
13-
using OnTopic.Tests.TestDoubles;
147

15-
namespace OnTopic.Tests.Fixtures {
8+
namespace OnTopic.Tests.Fixtures
9+
{
1610

1711
/*============================================================================================================================
1812
| CLASS: TYPE ACCESSOR FIXTURE

OnTopic.Tests/HierarchicalTopicMappingServiceTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using OnTopic.Repositories;
99
using OnTopic.TestDoubles;
1010
using OnTopic.Tests.Fixtures;
11+
using Xunit;
1112

1213
namespace OnTopic.Tests {
1314

OnTopic.Tests/ITopicRepositoryTest.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using OnTopic.Repositories;
99
using OnTopic.TestDoubles;
1010
using OnTopic.Tests.Fixtures;
11+
using Xunit;
1112

1213
namespace OnTopic.Tests {
1314

@@ -22,7 +23,7 @@ namespace OnTopic.Tests {
2223
/// underlying <see cref="TopicRepository"/> functions are also operating correctly.
2324
/// </remarks>
2425
[ExcludeFromCodeCoverage]
25-
[Collection("Shared Repository")]
26+
[Xunit.Collection("Shared Repository")]
2627
public class ITopicRepositoryTest {
2728

2829
/*==========================================================================================================================

OnTopic.Tests/ITypeLookupServiceTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using OnTopic.Lookup;
77
using OnTopic.Tests.TestDoubles;
88
using OnTopic.Tests.ViewModels;
9+
using Xunit;
910

1011
namespace OnTopic.Tests {
1112

0 commit comments

Comments
 (0)