Skip to content

Commit

Permalink
Add global using in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
petar-m committed Apr 30, 2024
1 parent 195a25d commit 9f994ad
Show file tree
Hide file tree
Showing 18 changed files with 24 additions and 131 deletions.
9 changes: 1 addition & 8 deletions test/M.EventBrokerSlim.Tests/EventBrokerTests.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
using System;
using System.Linq;
using System.Threading;
using System.Threading.Channels;
using System.Threading.Tasks;
using M.EventBrokerSlim.DependencyInjection;
using System.Threading.Channels;
using MELT;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Xunit;

namespace M.EventBrokerSlim.Tests;

Expand Down
5 changes: 1 addition & 4 deletions test/M.EventBrokerSlim.Tests/EventRecorder.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.Collections.Concurrent;
using System.Linq;
using System.Threading.Tasks;
using System.Collections.Concurrent;

namespace M.EventBrokerSlim.Tests;

Expand Down
4 changes: 1 addition & 3 deletions test/M.EventBrokerSlim.Tests/EventsTracker.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections.Concurrent;
using System.Threading.Tasks;
using System.Collections.Concurrent;

namespace M.EventBrokerSlim.Tests;

Expand Down
9 changes: 1 addition & 8 deletions test/M.EventBrokerSlim.Tests/ExceptionHandlingTests.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using M.EventBrokerSlim.DependencyInjection;
using MELT;
using Microsoft.Extensions.DependencyInjection;
using MELT;
using Microsoft.Extensions.Logging;
using Xunit;

namespace M.EventBrokerSlim.Tests;
public class ExceptionHandlingTests
Expand Down
7 changes: 7 additions & 0 deletions test/M.EventBrokerSlim.Tests/GlobalUsings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
global using System;
global using System.Linq;
global using System.Threading;
global using System.Threading.Tasks;
global using M.EventBrokerSlim.DependencyInjection;
global using Microsoft.Extensions.DependencyInjection;
global using Xunit;
9 changes: 1 addition & 8 deletions test/M.EventBrokerSlim.Tests/HandlerExecutionTests.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using M.EventBrokerSlim.DependencyInjection;
using MELT;
using Microsoft.Extensions.DependencyInjection;
using MELT;
using Microsoft.Extensions.Logging;
using Xunit;

namespace M.EventBrokerSlim.Tests;

Expand Down
10 changes: 1 addition & 9 deletions test/M.EventBrokerSlim.Tests/HandlerRegistrationTests.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using M.EventBrokerSlim.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Xunit;

namespace M.EventBrokerSlim.Tests;
namespace M.EventBrokerSlim.Tests;

public class HandlerRegistrationTests
{
Expand Down
9 changes: 1 addition & 8 deletions test/M.EventBrokerSlim.Tests/HandlerScopeAndInstanceTests.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using M.EventBrokerSlim.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Xunit;

namespace M.EventBrokerSlim.Tests;
namespace M.EventBrokerSlim.Tests;

public class HandlerScopeAndInstanceTests
{
Expand Down
10 changes: 1 addition & 9 deletions test/M.EventBrokerSlim.Tests/LoadTests.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using M.EventBrokerSlim.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Xunit;

namespace M.EventBrokerSlim.Tests;
namespace M.EventBrokerSlim.Tests;

public class LoadTests
{
Expand Down
9 changes: 1 addition & 8 deletions test/M.EventBrokerSlim.Tests/MultipleHandlersTests.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using M.EventBrokerSlim.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Xunit;

namespace M.EventBrokerSlim.Tests;
namespace M.EventBrokerSlim.Tests;

public class MultipleHandlersTests
{
Expand Down
10 changes: 1 addition & 9 deletions test/M.EventBrokerSlim.Tests/OrderOfRetriesTests.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using M.EventBrokerSlim.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Xunit;

namespace M.EventBrokerSlim.Tests;
namespace M.EventBrokerSlim.Tests;

public class OrderOfRetriesTests
{
Expand Down
10 changes: 1 addition & 9 deletions test/M.EventBrokerSlim.Tests/RetryFromHandleTests.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using M.EventBrokerSlim.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Xunit;

namespace M.EventBrokerSlim.Tests;
namespace M.EventBrokerSlim.Tests;

public class RetryFromHandleTests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using M.EventBrokerSlim.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Xunit;

namespace M.EventBrokerSlim.Tests;
namespace M.EventBrokerSlim.Tests;

public class RetryFromHandleUsingDelayDelegateTests
{
Expand Down
10 changes: 1 addition & 9 deletions test/M.EventBrokerSlim.Tests/RetryFromOnErrorTests.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using M.EventBrokerSlim.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Xunit;

namespace M.EventBrokerSlim.Tests;
namespace M.EventBrokerSlim.Tests;

public class RetryFromOnErrorTests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using M.EventBrokerSlim.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Xunit;

namespace M.EventBrokerSlim.Tests;
namespace M.EventBrokerSlim.Tests;

public class RetryFromOnErrorUsingDelayDelegateTests
{
Expand Down
10 changes: 1 addition & 9 deletions test/M.EventBrokerSlim.Tests/RetryOverrideFromOnErrorTests.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using M.EventBrokerSlim.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Xunit;

namespace M.EventBrokerSlim.Tests;
namespace M.EventBrokerSlim.Tests;

public class RetryOverrideFromOnErrorTests
{
Expand Down
10 changes: 1 addition & 9 deletions test/M.EventBrokerSlim.Tests/RetryPolicyTests.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using M.EventBrokerSlim.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Xunit;

namespace M.EventBrokerSlim.Tests;
namespace M.EventBrokerSlim.Tests;

public class RetryPolicyTests
{
Expand Down
4 changes: 1 addition & 3 deletions test/M.EventBrokerSlim.Tests/ServiceProviderHelper.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging;

namespace M.EventBrokerSlim.Tests;

Expand Down

0 comments on commit 9f994ad

Please sign in to comment.