From 0ac12abcf8789624554249617d014cc6504425aa Mon Sep 17 00:00:00 2001
From: Jing Xia <185141590+xj-ms@users.noreply.github.com>
Date: Thu, 16 Jul 2026 17:19:56 -0700
Subject: [PATCH 1/2] Upgrade to MSTest4
---
src/Directory.Build.targets | 6 +-
.../Plugins/PluginsLoaderTests.cs | 60 ++++------
.../ColumnBuilding/EmptyColumnBuilderTests.cs | 14 +--
.../ColumnBuilding/ModalColumnBuilderTests.cs | 12 +-
.../ToggledColumnBuilderTests.cs | 12 +-
.../CookedDataReflectorTests.cs | 4 +-
.../DataSourceResolverTests.cs | 6 +-
.../AssemblyExtensionDiscoveryTests.cs | 2 +-
.../CompositeCookerRepositoryTests.cs | 4 +-
.../CompositeDataCookerReferenceTests.cs | 22 ++--
.../DataCookerSchedulingNodeTests.cs | 8 +-
.../DataExtensionDependencyTests.cs | 4 +-
.../DataExtensionRepositoryTests.cs | 16 +--
.../DataExtensionRetrievalFactoryTests.cs | 14 +--
.../DataProcessorReferenceTests.cs | 26 ++---
.../DependencyDagExtensionsTests.cs | 4 +-
.../Extensibility/DependencyDagTests.cs | 10 +-
.../SourceDataCookerReferenceTests.cs | 24 ++--
.../Extensibility/SourceSessionTests.cs | 6 +-
.../TableExtensionReferenceTests.cs | 12 +-
.../Options/PluginOptionsSystemTests.cs | 6 +-
.../Options/StreamPluginOptionsLoaderTests.cs | 2 +-
.../Options/StreamPluginOptionsSaverTests.cs | 2 +-
.../ProcessingSourceExecutorTests.cs | 4 +-
.../ProcessingSourceReferenceTests.cs | 48 ++++----
.../TableBuilderTests.cs | 24 ++--
.../VersionCheckerTests.cs | 5 +-
.../CollectionExtensionsTests.cs | 4 +-
.../ColumnVariantsTests.cs | 6 +-
.../DataSourceInfoTests.cs | 12 +-
.../DirectoryDataSourceAttributeTests.cs | 4 +-
...tensionlessFileDataSourceAttributeTests.cs | 4 +-
.../FileDataSourceAttributeTests.cs | 8 +-
.../ProcessingSourceTests.cs | 8 +-
.../ProjectionTests.cs | 108 ++++++++---------
.../TableConfigurationTests.cs | 10 +-
.../TestClasses/TableDescriptorUtils.cs | 6 +-
.../TypeExtensionTests.cs | 10 +-
src/Microsoft.Performance.Testing/AssertEx.cs | 6 +-
.../DataSourceSetTests.cs | 24 ++--
.../EngineFixture.cs | 7 +-
.../PluginSetTests.cs | 6 +-
.../ToolkitEngineCreateInfoTests.cs | 2 +-
.../ToolkitEngineTests.cs | 110 ++++++++----------
...formance.Toolkit.Plugins.Core.Tests.csproj | 13 ++-
.../FileSystemInstalledPluginStorageTests.cs | 2 +-
.../FileSystemPluginRegistryTests.cs | 26 ++---
...mance.Toolkit.Plugins.Runtime.Tests.csproj | 15 ++-
.../PluginSourcesRepositoryTests.cs | 8 +-
...rformance.Toolkit.Plugins.Cli.Tests.csproj | 12 +-
50 files changed, 369 insertions(+), 399 deletions(-)
diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets
index baef63bf8..cde6973c8 100644
--- a/src/Directory.Build.targets
+++ b/src/Directory.Build.targets
@@ -1,9 +1,9 @@
-
-
-
+
+
+
diff --git a/src/Microsoft.Performance.SDK.Runtime.NetCoreApp.Tests/Plugins/PluginsLoaderTests.cs b/src/Microsoft.Performance.SDK.Runtime.NetCoreApp.Tests/Plugins/PluginsLoaderTests.cs
index e9377142a..cc111e97c 100644
--- a/src/Microsoft.Performance.SDK.Runtime.NetCoreApp.Tests/Plugins/PluginsLoaderTests.cs
+++ b/src/Microsoft.Performance.SDK.Runtime.NetCoreApp.Tests/Plugins/PluginsLoaderTests.cs
@@ -115,7 +115,7 @@ public static void Initialize(TestContext context)
// If this Assert is hit, the SDK was likely updated to break
// the processing source definitions used to test this class
- Assert.Fail("ProcessingSource {0} failed to compile", plugin);
+ Assert.Fail($"ProcessingSource {plugin} failed to compile");
}
else
{
@@ -130,7 +130,7 @@ public static void Initialize(TestContext context)
public void NullDirectoryThrows()
{
(var loader, _) = Setup(true);
- Assert.ThrowsException(() => loader.TryLoadPlugin(null, out _));
+ Assert.ThrowsExactly(() => loader.TryLoadPlugin(null, out _));
}
[TestMethod]
@@ -138,7 +138,7 @@ public void NullDirectoryThrows()
public async Task NullDirectoryThrowsAsync()
{
(var loader, _) = Setup(true);
- await Assert.ThrowsExceptionAsync(() => loader.TryLoadPluginAsync(null));
+ await Assert.ThrowsExactlyAsync(() => loader.TryLoadPluginAsync(null));
}
[TestMethod]
@@ -146,7 +146,7 @@ public async Task NullDirectoryThrowsAsync()
public void NullDirectoriesThrows()
{
(var loader, _) = Setup(true);
- Assert.ThrowsException(() => loader.TryLoadPlugins(null, out _));
+ Assert.ThrowsExactly(() => loader.TryLoadPlugins(null, out _));
}
[TestMethod]
@@ -154,7 +154,7 @@ public void NullDirectoriesThrows()
public async Task NullDirectoriesThrowsAsync()
{
(var loader, _) = Setup(true);
- await Assert.ThrowsExceptionAsync(() => loader.TryLoadPluginsAsync(null));
+ await Assert.ThrowsExactlyAsync(() => loader.TryLoadPluginsAsync(null));
}
[TestMethod]
@@ -162,7 +162,7 @@ public async Task NullDirectoriesThrowsAsync()
public void NullDirectoryInDirectoriesThrows()
{
(var loader, _) = Setup(true);
- Assert.ThrowsException(() => loader.TryLoadPlugins(new List() { "foo", null }, out _));
+ Assert.ThrowsExactly(() => loader.TryLoadPlugins(new List() { "foo", null }, out _));
}
[TestMethod]
@@ -170,7 +170,7 @@ public void NullDirectoryInDirectoriesThrows()
public async Task NullDirectoryInDirectoriesThrowsAsync()
{
(var loader, _) = Setup(true);
- await Assert.ThrowsExceptionAsync(() => loader.TryLoadPluginsAsync(new List() { "foo", null }));
+ await Assert.ThrowsExactlyAsync(() => loader.TryLoadPluginsAsync(new List() { "foo", null }));
}
[TestMethod]
@@ -635,9 +635,7 @@ public void ConcurrentLoadTest()
// Assert blocking observed first plugin
Assert.AreEqual(expected0.Length,
blockingConsumer.ObservedDataSources.Count,
- "Blocking consumer observed {0} data sources but should have observed {1}",
- blockingConsumer.ObservedDataSources.Count,
- expected0.Length);
+ $"Blocking consumer observed {blockingConsumer.ObservedDataSources.Count} data sources but should have observed {expected0.Length}");
AssertObservedCDSs(expected0, blockingConsumer);
// Allow InvalidB to be processed
@@ -660,16 +658,16 @@ public async Task WhenDisposed_EverythingThrows()
{
sut.Dispose();
- Assert.ThrowsException(() => sut.LoadedProcessingSources);
+ Assert.ThrowsExactly(() => sut.LoadedProcessingSources);
- Assert.ThrowsException(() => sut.Subscribe(new MockPluginsConsumer()));
- await Assert.ThrowsExceptionAsync(() => sut.SubscribeAsync(new MockPluginsConsumer()));
- Assert.ThrowsException(() => sut.TryLoadPlugin(Any.FilePath(), out _));
- await Assert.ThrowsExceptionAsync(() => sut.TryLoadPluginAsync(Any.FilePath()));
- Assert.ThrowsException(() => sut.TryLoadPlugins(new[] { Any.FilePath(), }, out _));
- await Assert.ThrowsExceptionAsync(() => sut.TryLoadPluginsAsync(new[] { Any.FilePath(), }));
- Assert.ThrowsException(() => sut.Unsubscribe(new MockPluginsConsumer()));
- await Assert.ThrowsExceptionAsync(() => sut.UnsubscribeAsync(new MockPluginsConsumer()));
+ Assert.ThrowsExactly(() => sut.Subscribe(new MockPluginsConsumer()));
+ await Assert.ThrowsExactlyAsync(() => sut.SubscribeAsync(new MockPluginsConsumer()));
+ Assert.ThrowsExactly(() => sut.TryLoadPlugin(Any.FilePath(), out _));
+ await Assert.ThrowsExactlyAsync(() => sut.TryLoadPluginAsync(Any.FilePath()));
+ Assert.ThrowsExactly(() => sut.TryLoadPlugins(new[] { Any.FilePath(), }, out _));
+ await Assert.ThrowsExactlyAsync(() => sut.TryLoadPluginsAsync(new[] { Any.FilePath(), }));
+ Assert.ThrowsExactly(() => sut.Unsubscribe(new MockPluginsConsumer()));
+ await Assert.ThrowsExactlyAsync(() => sut.UnsubscribeAsync(new MockPluginsConsumer()));
}
}
@@ -741,17 +739,12 @@ private static void AssertNumberProcessingSourcesLoaded(int expected, PluginsLoa
{
Assert.AreEqual(expected,
loader.LoadedProcessingSources.Count(),
- "The plugins loader reports having loaded {0} instead of {1} processing sources",
- loader.LoadedProcessingSources.Count(),
- expected);
+ $"The plugins loader reports having loaded {loader.LoadedProcessingSources.Count()} instead of {expected} processing sources");
foreach (var consumer in consumers)
{
Assert.AreEqual(expected,
consumer.ObservedDataSources.Count,
- "Consumer {0} observed {1} instead of {2} processing sources",
- consumer,
- consumer.ObservedDataSources.Count,
- expected);
+ $"Consumer {consumer} observed {consumer.ObservedDataSources.Count} instead of {expected} processing sources");
}
}
@@ -794,22 +787,13 @@ private static void AssertCDSs(Type[] types, IEnumerable(() =>
+ Assert.ThrowsExactly(() =>
{
builder.WithToggle(null, Projection.Constant(1f));
});
@@ -34,7 +34,7 @@ public void WithToggle_NullProjectionThrows()
{
var builder = CreateSut();
- Assert.ThrowsException(() =>
+ Assert.ThrowsExactly(() =>
{
builder.WithToggle(new ColumnVariantDescriptor(Guid.NewGuid(), new ColumnVariantProperties { Label = "Foo" }), null);
});
@@ -45,7 +45,7 @@ public void WithHierarchicalToggle_NullIdentifierThrows()
{
var builder = CreateSut();
- Assert.ThrowsException(() =>
+ Assert.ThrowsExactly(() =>
{
builder.WithHierarchicalToggle(
null,
@@ -59,7 +59,7 @@ public void WithHierarchicalToggle_NullProjectionThrows()
{
var builder = CreateSut();
- Assert.ThrowsException(() =>
+ Assert.ThrowsExactly(() =>
{
builder.WithHierarchicalToggle(
new ColumnVariantDescriptor(Guid.NewGuid(), new ColumnVariantProperties { Label = "Foo" }),
@@ -73,7 +73,7 @@ public void WithHierarchicalToggle_NullCollectionInfoThrows()
{
var builder = CreateSut();
- Assert.ThrowsException(() =>
+ Assert.ThrowsExactly(() =>
{
builder.WithHierarchicalToggle(
new ColumnVariantDescriptor(Guid.NewGuid(), new ColumnVariantProperties { Label = "Foo" }),
@@ -87,7 +87,7 @@ public void WithToggledModes_NullTextThrows()
{
var builder = CreateSut();
- Assert.ThrowsException(() => { builder.WithToggledModes(null, builder => builder); });
+ Assert.ThrowsExactly(() => { builder.WithToggledModes(null, builder => builder); });
}
[TestMethod]
@@ -103,7 +103,7 @@ public void WithModes_NullPropertiesThrows()
{
var builder = CreateSut();
- Assert.ThrowsException(() => { builder.WithModes(null, builder => builder); });
+ Assert.ThrowsExactly(() => { builder.WithModes(null, builder => builder); });
}
[TestMethod]
diff --git a/src/Microsoft.Performance.SDK.Runtime.Tests/ColumnBuilding/ModalColumnBuilderTests.cs b/src/Microsoft.Performance.SDK.Runtime.Tests/ColumnBuilding/ModalColumnBuilderTests.cs
index 4251cd139..fa7835da0 100644
--- a/src/Microsoft.Performance.SDK.Runtime.Tests/ColumnBuilding/ModalColumnBuilderTests.cs
+++ b/src/Microsoft.Performance.SDK.Runtime.Tests/ColumnBuilding/ModalColumnBuilderTests.cs
@@ -27,7 +27,7 @@ public void WithMode_NullIdentifierThrows()
{
var builder = CreateSut();
- Assert.ThrowsException(() =>
+ Assert.ThrowsExactly(() =>
{
builder.WithMode(null, Projection.Constant(1f));
});
@@ -38,7 +38,7 @@ public void WithMode_NullProjectionThrows()
{
var builder = CreateSut();
- Assert.ThrowsException(() =>
+ Assert.ThrowsExactly(() =>
{
builder.WithMode(modeDescriptor, null);
});
@@ -57,7 +57,7 @@ public void WithHierarchicalMode_NullIdentifierThrows()
{
var builder = CreateSut();
- Assert.ThrowsException(() =>
+ Assert.ThrowsExactly(() =>
{
builder.WithHierarchicalMode(
null,
@@ -71,7 +71,7 @@ public void WithHierarchicalMode_NullProjectionThrows()
{
var builder = CreateSut();
- Assert.ThrowsException(() =>
+ Assert.ThrowsExactly(() =>
{
builder.WithHierarchicalMode(
modeDescriptor,
@@ -85,7 +85,7 @@ public void WithHierarchicalMode_NullCollectionInfoThrows()
{
var builder = CreateSut();
- Assert.ThrowsException(() =>
+ Assert.ThrowsExactly(() =>
{
builder.WithHierarchicalMode(
modeDescriptor,
@@ -111,7 +111,7 @@ public void WithDefaultMode_UnregisteredGuidThrows()
{
var builder = CreateSut();
- Assert.ThrowsException(() =>
+ Assert.ThrowsExactly(() =>
{
builder.WithDefaultMode(Guid.NewGuid());
});
diff --git a/src/Microsoft.Performance.SDK.Runtime.Tests/ColumnBuilding/ToggledColumnBuilderTests.cs b/src/Microsoft.Performance.SDK.Runtime.Tests/ColumnBuilding/ToggledColumnBuilderTests.cs
index 245c0d670..7b7dc7dbd 100644
--- a/src/Microsoft.Performance.SDK.Runtime.Tests/ColumnBuilding/ToggledColumnBuilderTests.cs
+++ b/src/Microsoft.Performance.SDK.Runtime.Tests/ColumnBuilding/ToggledColumnBuilderTests.cs
@@ -23,7 +23,7 @@ public void WithToggle_NullIdentifierThrows()
{
var builder = CreateSut();
- Assert.ThrowsException(() =>
+ Assert.ThrowsExactly(() =>
{
builder.WithToggle(null, Projection.Constant(1f));
});
@@ -34,7 +34,7 @@ public void WithToggle_NullProjectionThrows()
{
var builder = CreateSut();
- Assert.ThrowsException(() =>
+ Assert.ThrowsExactly(() =>
{
builder.WithToggle(new ColumnVariantDescriptor(Guid.NewGuid(), new ColumnVariantProperties { Label = "Foo" }), null);
});
@@ -45,7 +45,7 @@ public void WithHierarchicalToggle_NullIdentifierThrows()
{
var builder = CreateSut();
- Assert.ThrowsException(() =>
+ Assert.ThrowsExactly(() =>
{
builder.WithHierarchicalToggle(
null,
@@ -59,7 +59,7 @@ public void WithHierarchicalToggle_NullProjectionThrows()
{
var builder = CreateSut();
- Assert.ThrowsException(() =>
+ Assert.ThrowsExactly(() =>
{
builder.WithHierarchicalToggle(
new ColumnVariantDescriptor(Guid.NewGuid(), new ColumnVariantProperties { Label = "Foo" }),
@@ -73,7 +73,7 @@ public void WithHierarchicalToggle_NullCollectionInfoThrows()
{
var builder = CreateSut();
- Assert.ThrowsException(() =>
+ Assert.ThrowsExactly(() =>
{
builder.WithHierarchicalToggle(
new ColumnVariantDescriptor(Guid.NewGuid(), new ColumnVariantProperties { Label = "Foo" }),
@@ -87,7 +87,7 @@ public void WithToggledModes_NullTextThrows()
{
var builder = CreateSut();
- Assert.ThrowsException(() => { builder.WithToggledModes(null, modesBuilder => modesBuilder); });
+ Assert.ThrowsExactly(() => { builder.WithToggledModes(null, modesBuilder => modesBuilder); });
}
[TestMethod]
diff --git a/src/Microsoft.Performance.SDK.Runtime.Tests/CookedDataReflectorTests.cs b/src/Microsoft.Performance.SDK.Runtime.Tests/CookedDataReflectorTests.cs
index 0157e1d4e..faf763852 100644
--- a/src/Microsoft.Performance.SDK.Runtime.Tests/CookedDataReflectorTests.cs
+++ b/src/Microsoft.Performance.SDK.Runtime.Tests/CookedDataReflectorTests.cs
@@ -112,7 +112,7 @@ public void TryQueryAddFuncAsFunc()
[UnitTest]
public void QueryAsWrongTypeThrows()
{
- Assert.ThrowsException(
+ Assert.ThrowsExactly(
() => testReflector.QueryOutput(
new DataOutputPath(TestCookedDataReflector.DefaultCookerPath, nameof(TestCookedDataReflector.AddFunc))));
}
@@ -133,7 +133,7 @@ public void TryQueryAsWrongTypeFails()
[UnitTest]
public void QueryNonExistentPathThrows()
{
- Assert.ThrowsException(
+ Assert.ThrowsExactly(
() => testReflector.QueryOutput(
new DataOutputPath(TestCookedDataReflector.DefaultCookerPath, "DoesNotExist")));
}
diff --git a/src/Microsoft.Performance.SDK.Runtime.Tests/DataSourceResolverTests.cs b/src/Microsoft.Performance.SDK.Runtime.Tests/DataSourceResolverTests.cs
index a3a6947d5..b040f18bf 100644
--- a/src/Microsoft.Performance.SDK.Runtime.Tests/DataSourceResolverTests.cs
+++ b/src/Microsoft.Performance.SDK.Runtime.Tests/DataSourceResolverTests.cs
@@ -24,7 +24,7 @@ public class DataSourceResolverTests
[UnitTest]
public void Assign_NullDataSourcesThrows()
{
- Assert.ThrowsException(
+ Assert.ThrowsExactly(
() => DataSourceResolver.Assign(null, Array.Empty()));
}
@@ -32,7 +32,7 @@ public void Assign_NullDataSourcesThrows()
[UnitTest]
public void Assign_NullProcessingSourcesThrows()
{
- Assert.ThrowsException(
+ Assert.ThrowsExactly(
() => DataSourceResolver.Assign(Array.Empty(), null));
}
@@ -161,7 +161,7 @@ public void AssignTests(AssignTestCase testCase)
var ecds = kvp.Key;
var eds = kvp.Value.ToList();
- Assert.IsTrue(actual.ContainsKey(ecds), "'{0}' is not found in the assignment.", ecds);
+ Assert.IsTrue(actual.ContainsKey(ecds), $"'{ecds}' is not found in the assignment.");
var ads = actual[ecds].ToList();
CollectionAssert.AreEquivalent(eds, ads);
diff --git a/src/Microsoft.Performance.SDK.Runtime.Tests/Discovery/AssemblyExtensionDiscoveryTests.cs b/src/Microsoft.Performance.SDK.Runtime.Tests/Discovery/AssemblyExtensionDiscoveryTests.cs
index db46e0b1d..163cfb83a 100644
--- a/src/Microsoft.Performance.SDK.Runtime.Tests/Discovery/AssemblyExtensionDiscoveryTests.cs
+++ b/src/Microsoft.Performance.SDK.Runtime.Tests/Discovery/AssemblyExtensionDiscoveryTests.cs
@@ -134,7 +134,7 @@ public void Setup()
[UnitTest]
public void ProcessAssemblies_NullDirectoryPath()
{
- Assert.ThrowsException(() => this.Discovery.ProcessAssemblies((string)null, out _));
+ Assert.ThrowsExactly(() => this.Discovery.ProcessAssemblies((string)null, out _));
}
[TestMethod]
diff --git a/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/CompositeCookerRepositoryTests.cs b/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/CompositeCookerRepositoryTests.cs
index 4ed6bef69..2aa626740 100644
--- a/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/CompositeCookerRepositoryTests.cs
+++ b/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/CompositeCookerRepositoryTests.cs
@@ -35,14 +35,14 @@ public void Cleanup()
[UnitTest]
public void Constructor_NullParam_Throws()
{
- Assert.ThrowsException(() => new ProcessingSystemCompositeCookers(null));
+ Assert.ThrowsExactly(() => new ProcessingSystemCompositeCookers(null));
}
[TestMethod]
[UnitTest]
public void Initialize_NullParam_Throws()
{
- Assert.ThrowsException(() => this.Sut.Initialize(null));
+ Assert.ThrowsExactly(() => this.Sut.Initialize(null));
}
[TestMethod]
diff --git a/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/CompositeDataCookerReferenceTests.cs b/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/CompositeDataCookerReferenceTests.cs
index 9847e6410..fd0780f8b 100644
--- a/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/CompositeDataCookerReferenceTests.cs
+++ b/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/CompositeDataCookerReferenceTests.cs
@@ -34,20 +34,20 @@ public void WhenDisposed_EverthingThrows()
sut.Dispose();
- Assert.ThrowsException(() => sut.Availability);
- Assert.ThrowsException(() => sut.DependencyReferences);
- Assert.ThrowsException(() => sut.Description);
- Assert.ThrowsException(() => sut.InitialAvailability);
- Assert.ThrowsException(() => sut.Name);
- Assert.ThrowsException(() => sut.Path);
- Assert.ThrowsException(() => sut.RequiredDataCookers);
+ Assert.ThrowsExactly(() => sut.Availability);
+ Assert.ThrowsExactly(() => sut.DependencyReferences);
+ Assert.ThrowsExactly(() => sut.Description);
+ Assert.ThrowsExactly(() => sut.InitialAvailability);
+ Assert.ThrowsExactly(() => sut.Name);
+ Assert.ThrowsExactly(() => sut.Path);
+ Assert.ThrowsExactly(() => sut.RequiredDataCookers);
// TODO: __SDK_DP__
// Redesign Data Processor API
- // Assert.ThrowsException(() => sut.RequiredDataProcessors);
+ // Assert.ThrowsExactly(() => sut.RequiredDataProcessors);
- Assert.ThrowsException(() => sut.CreateInstance(new FakeRetrieval()));
- Assert.ThrowsException(() => sut.PerformAdditionalDataExtensionValidation(new FakeSupport(), new FakeReference()));
- Assert.ThrowsException(() => sut.ProcessDependencies(new TestDataExtensionRepository()));
+ Assert.ThrowsExactly(() => sut.CreateInstance(new FakeRetrieval()));
+ Assert.ThrowsExactly(() => sut.PerformAdditionalDataExtensionValidation(new FakeSupport(), new FakeReference()));
+ Assert.ThrowsExactly(() => sut.ProcessDependencies(new TestDataExtensionRepository()));
}
finally
{
diff --git a/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/DataCookerSchedulingNodeTests.cs b/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/DataCookerSchedulingNodeTests.cs
index c719feb4b..e6368bae1 100644
--- a/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/DataCookerSchedulingNodeTests.cs
+++ b/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/DataCookerSchedulingNodeTests.cs
@@ -137,7 +137,7 @@ public void Initialize()
[UnitTest]
public void ConstructorThrowsWithoutDependencySupportInDataCooker()
{
- Assert.ThrowsException(
+ Assert.ThrowsExactly(
() => DataCookerSchedulingNode.CreateSchedulingNode(new DataCookerWithoutDependencies()));
}
@@ -245,7 +245,7 @@ public void ScheduleDataCookers_CircularDependenciesThrows()
scheduler.AddNode(cookerWithCircularDependency2Node);
scheduler.AddNode(cookerWithCircularDependency3Node);
- Assert.ThrowsException(
+ Assert.ThrowsExactly(
() => cookerWithCircularDependency1Node.Schedule(scheduler, null));
}
@@ -1287,7 +1287,7 @@ public void AsRequiredNode_DependentNotAligned_Throws()
scheduler.AddNode(node);
scheduler.AddNode(asRequiredNode);
- Assert.ThrowsException(() => node.Schedule(scheduler, null));
+ Assert.ThrowsExactly(() => node.Schedule(scheduler, null));
}
[TestMethod]
@@ -1321,7 +1321,7 @@ public void AsRequiredNode_NonAsRequiredDependency_Throws()
scheduler.AddNode(node2);
scheduler.AddNode(asRequiredNode);
- Assert.ThrowsException(() => node1.Schedule(scheduler, null));
+ Assert.ThrowsExactly(() => node1.Schedule(scheduler, null));
}
}
}
diff --git a/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/DataExtensionDependencyTests.cs b/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/DataExtensionDependencyTests.cs
index bce7a9c86..97255c001 100644
--- a/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/DataExtensionDependencyTests.cs
+++ b/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/DataExtensionDependencyTests.cs
@@ -20,7 +20,7 @@ public class DataExtensionDependencyTests
[UnitTest]
public void ConstructorThrowsForNullDependencyTarget()
{
- Assert.ThrowsException(
+ Assert.ThrowsExactly(
() => new DataExtensionDependencyState((IDataExtensionDependencyTarget)null));
}
@@ -28,7 +28,7 @@ public void ConstructorThrowsForNullDependencyTarget()
[UnitTest]
public void ConstructorThrowsForNullOther()
{
- Assert.ThrowsException(
+ Assert.ThrowsExactly(
() => new DataExtensionDependencyState((DataExtensionDependencyState)null));
}
diff --git a/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/DataExtensionRepositoryTests.cs b/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/DataExtensionRepositoryTests.cs
index bb623bf40..e11b7523e 100644
--- a/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/DataExtensionRepositoryTests.cs
+++ b/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/DataExtensionRepositoryTests.cs
@@ -33,19 +33,19 @@ public void WhenDisposed_EverythingThrows()
{
this.Sut.Dispose();
- Assert.ThrowsException(() => this.Sut.CompositeDataCookers);
+ Assert.ThrowsExactly(() => this.Sut.CompositeDataCookers);
// TODO: __SDK_DP__
// Redesign Data Processor API
- ////Assert.ThrowsException(() => this.Sut.DataProcessors);
- Assert.ThrowsException(() => this.Sut.SourceDataCookers);
- Assert.ThrowsException(() => this.Sut.TablesById);
+ ////Assert.ThrowsExactly(() => this.Sut.DataProcessors);
+ Assert.ThrowsExactly(() => this.Sut.SourceDataCookers);
+ Assert.ThrowsExactly(() => this.Sut.TablesById);
- Assert.ThrowsException(() => this.Sut.GetCompositeDataCookerReference(new DataCookerPath()));
+ Assert.ThrowsExactly(() => this.Sut.GetCompositeDataCookerReference(new DataCookerPath()));
// TODO: __SDK_DP__
// Redesign Data Processor API
- ////Assert.ThrowsException(() => this.Sut.GetDataProcessorReference(new DataProcessorId()));
- Assert.ThrowsException(() => this.Sut.GetSourceDataCookerFactory(new DataCookerPath()));
- Assert.ThrowsException(() => this.Sut.GetSourceDataCookerReference(new DataCookerPath()));
+ ////Assert.ThrowsExactly(() => this.Sut.GetDataProcessorReference(new DataProcessorId()));
+ Assert.ThrowsExactly(() => this.Sut.GetSourceDataCookerFactory(new DataCookerPath()));
+ Assert.ThrowsExactly(() => this.Sut.GetSourceDataCookerReference(new DataCookerPath()));
}
[TestMethod]
diff --git a/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/DataExtensionRetrievalFactoryTests.cs b/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/DataExtensionRetrievalFactoryTests.cs
index 45ec23168..5759c44a0 100644
--- a/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/DataExtensionRetrievalFactoryTests.cs
+++ b/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/DataExtensionRetrievalFactoryTests.cs
@@ -34,7 +34,7 @@ public void Constructor_NullRepo_Throws()
var sourceCookerData = CreateSourceCookerData();
var compositeCookerData = CreateCompositeCookerData(dataExtensionRepository);
- Assert.ThrowsException(() =>
+ Assert.ThrowsExactly(() =>
new DataExtensionRetrievalFactory(sourceCookerData, compositeCookerData, null));
}
@@ -45,7 +45,7 @@ public void Constructor_NullSourceCookerData_Throws()
var dataExtensionRepository = new TestDataExtensionRepository();
var compositeCookerData = CreateCompositeCookerData(dataExtensionRepository);
- Assert.ThrowsException(() =>
+ Assert.ThrowsExactly(() =>
new DataExtensionRetrievalFactory(null, compositeCookerData, dataExtensionRepository));
}
@@ -56,7 +56,7 @@ public void Constructor_NullCompositeCookerData_Throws()
var dataExtensionRepository = new TestDataExtensionRepository();
var sourceCookerData = CreateSourceCookerData();
- Assert.ThrowsException(() =>
+ Assert.ThrowsExactly(() =>
new DataExtensionRetrievalFactory(sourceCookerData, null, dataExtensionRepository));
}
@@ -112,7 +112,7 @@ public void CreateDataRetrievalForCompositeDataCooker_MissingCookerThrows()
var dataExtensionRetrievalFactory =
new DataExtensionRetrievalFactory(sourceCookerData, compositeCookerData, dataExtensionRepository);
- Assert.ThrowsException(() =>
+ Assert.ThrowsExactly(() =>
dataExtensionRetrievalFactory.CreateDataRetrievalForCompositeDataCooker(cookerPath));
}
@@ -135,7 +135,7 @@ public void CreateDataRetrievalForCompositeDataCooker_NotAvailableCookerThrows()
var dataExtensionRetrievalFactory =
new DataExtensionRetrievalFactory(sourceCookerData, compositeCookerData, dataExtensionRepository);
- Assert.ThrowsException(() =>
+ Assert.ThrowsExactly(() =>
dataExtensionRetrievalFactory.CreateDataRetrievalForCompositeDataCooker(dataCookerReference.Path));
}
@@ -199,7 +199,7 @@ public void CreateDataRetrievalForTable_MissingCookerThrows()
var dataExtensionRetrievalFactory =
new DataExtensionRetrievalFactory(sourceCookerData, compositeCookerData, dataExtensionRepository);
- Assert.ThrowsException(() =>
+ Assert.ThrowsExactly(() =>
dataExtensionRetrievalFactory.CreateDataRetrievalForTable(tableId));
}
@@ -230,7 +230,7 @@ public void CreateDataRetrievalForTable_NotAvailableCookerThrows()
var dataExtensionRetrievalFactory =
new DataExtensionRetrievalFactory(sourceCookerData, compositeCookerData, dataExtensionRepository);
- Assert.ThrowsException(() =>
+ Assert.ThrowsExactly(() =>
dataExtensionRetrievalFactory.CreateDataRetrievalForTable(tableReference.TableDescriptor.Guid));
}
}
diff --git a/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/DataProcessorReferenceTests.cs b/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/DataProcessorReferenceTests.cs
index 1eb8ed87c..1d83cef70 100644
--- a/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/DataProcessorReferenceTests.cs
+++ b/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/DataProcessorReferenceTests.cs
@@ -34,19 +34,19 @@ namespace Microsoft.Performance.SDK.Runtime.Tests.Extensibility
//// sut.Dispose();
- //// Assert.ThrowsException(() => sut.Availability);
- //// Assert.ThrowsException(() => sut.DependencyReferences);
- //// Assert.ThrowsException(() => sut.DependencyState);
- //// Assert.ThrowsException(() => sut.Description);
- //// Assert.ThrowsException(() => sut.Id);
- //// Assert.ThrowsException(() => sut.InitialAvailability);
- //// Assert.ThrowsException(() => sut.Name);
- //// Assert.ThrowsException(() => sut.RequiredDataCookers);
- //// Assert.ThrowsException(() => sut.RequiredDataProcessors);
-
- //// Assert.ThrowsException(() => sut.GetOrCreateInstance(new FakeRetrieval()));
- //// Assert.ThrowsException(() => sut.PerformAdditionalDataExtensionValidation(new FakeSupport(), new FakeReference()));
- //// Assert.ThrowsException(() => sut.ProcessDependencies(new TestDataExtensionRepository()));
+ //// Assert.ThrowsExactly(() => sut.Availability);
+ //// Assert.ThrowsExactly(() => sut.DependencyReferences);
+ //// Assert.ThrowsExactly(() => sut.DependencyState);
+ //// Assert.ThrowsExactly(() => sut.Description);
+ //// Assert.ThrowsExactly(() => sut.Id);
+ //// Assert.ThrowsExactly(() => sut.InitialAvailability);
+ //// Assert.ThrowsExactly(() => sut.Name);
+ //// Assert.ThrowsExactly(() => sut.RequiredDataCookers);
+ //// Assert.ThrowsExactly(() => sut.RequiredDataProcessors);
+
+ //// Assert.ThrowsExactly(() => sut.GetOrCreateInstance(new FakeRetrieval()));
+ //// Assert.ThrowsExactly(() => sut.PerformAdditionalDataExtensionValidation(new FakeSupport(), new FakeReference()));
+ //// Assert.ThrowsExactly(() => sut.ProcessDependencies(new TestDataExtensionRepository()));
//// }
//// finally
//// {
diff --git a/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/DependencyDagExtensionsTests.cs b/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/DependencyDagExtensionsTests.cs
index 1de9e96f5..ca9b0dafd 100644
--- a/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/DependencyDagExtensionsTests.cs
+++ b/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/DependencyDagExtensionsTests.cs
@@ -26,8 +26,8 @@ public void DependentWalk_NullParameters_Throw()
var dag = DependencyDag.Create(catalog, repo);
- Assert.ThrowsException(() => DependencyDagExtensions.DependentWalk(null, x => { }));
- Assert.ThrowsException(() => dag.DependentWalk(null));
+ Assert.ThrowsExactly(() => DependencyDagExtensions.DependentWalk(null, x => { }));
+ Assert.ThrowsExactly(() => dag.DependentWalk(null));
}
[TestMethod]
diff --git a/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/DependencyDagTests.cs b/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/DependencyDagTests.cs
index 0467e4645..de2b234b1 100644
--- a/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/DependencyDagTests.cs
+++ b/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/DependencyDagTests.cs
@@ -24,8 +24,8 @@ public class DependencyDagTests
[UnitTest]
public void Create_NullParameters_Throw()
{
- Assert.ThrowsException(() => DependencyDag.Create(null, new TestDataExtensionRepository()));
- Assert.ThrowsException(() => DependencyDag.Create(new TestProcessingSourceCatalog(), null));
+ Assert.ThrowsExactly(() => DependencyDag.Create(null, new TestDataExtensionRepository()));
+ Assert.ThrowsExactly(() => DependencyDag.Create(new TestProcessingSourceCatalog(), null));
}
[TestMethod]
@@ -36,7 +36,7 @@ public void Create_UnloadedCatalog_Throws()
var repo = new DataExtensionRepository();
repo.FinalizeDataExtensions();
- Assert.ThrowsException(() => DependencyDag.Create(catalog, repo));
+ Assert.ThrowsExactly(() => DependencyDag.Create(catalog, repo));
}
[TestMethod]
@@ -543,7 +543,7 @@ public void CyclesNotAllowed()
repo.TryAddReference(r0d3);
repo.FinalizeDataExtensions();
- var e = Assert.ThrowsException(() => DependencyDag.Create(catalog, repo));
+ var e = Assert.ThrowsExactly(() => DependencyDag.Create(catalog, repo));
var expectedCycleString = string.Format(
"Cycle: {0} -> {1} -> {2} -> {0}",
@@ -586,7 +586,7 @@ public void DeeperCyclesNotAllowed()
repo.TryAddReference(r0d3);
repo.FinalizeDataExtensions();
- var e = Assert.ThrowsException(() => DependencyDag.Create(catalog, repo));
+ var e = Assert.ThrowsExactly(() => DependencyDag.Create(catalog, repo));
var expectedCycleString = string.Format(
"Cycle: {0} -> {1} -> {2} -> {0}",
diff --git a/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/SourceDataCookerReferenceTests.cs b/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/SourceDataCookerReferenceTests.cs
index 33ef6531e..8a494aa83 100644
--- a/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/SourceDataCookerReferenceTests.cs
+++ b/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/SourceDataCookerReferenceTests.cs
@@ -154,21 +154,21 @@ public void WhenDisposed_EverythingThrows()
sut.Dispose();
- Assert.ThrowsException(() => sut.Availability);
- Assert.ThrowsException(() => sut.DependencyReferences);
- Assert.ThrowsException(() => sut.Description);
- Assert.ThrowsException(() => sut.InitialAvailability);
- Assert.ThrowsException(() => sut.Name);
- Assert.ThrowsException(() => sut.Path);
-
- Assert.ThrowsException(() => sut.CreateInstance());
- Assert.ThrowsException(() => sut.PerformAdditionalDataExtensionValidation(new FakeSupport(), new FakeReference()));
- Assert.ThrowsException(() => sut.ProcessDependencies(new TestDataExtensionRepository()));
- Assert.ThrowsException(() => sut.RequiredDataCookers);
+ Assert.ThrowsExactly(() => sut.Availability);
+ Assert.ThrowsExactly(() => sut.DependencyReferences);
+ Assert.ThrowsExactly(() => sut.Description);
+ Assert.ThrowsExactly(() => sut.InitialAvailability);
+ Assert.ThrowsExactly(() => sut.Name);
+ Assert.ThrowsExactly(() => sut.Path);
+
+ Assert.ThrowsExactly(() => sut.CreateInstance());
+ Assert.ThrowsExactly(() => sut.PerformAdditionalDataExtensionValidation(new FakeSupport(), new FakeReference()));
+ Assert.ThrowsExactly(() => sut.ProcessDependencies(new TestDataExtensionRepository()));
+ Assert.ThrowsExactly(() => sut.RequiredDataCookers);
// TODO: __SDK_DP__
// Redesign Data Processor API
- // Assert.ThrowsException(() => sut.RequiredDataProcessors);
+ // Assert.ThrowsExactly(() => sut.RequiredDataProcessors);
}
finally
{
diff --git a/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/SourceSessionTests.cs b/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/SourceSessionTests.cs
index 05b71de4f..1e862a1c7 100644
--- a/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/SourceSessionTests.cs
+++ b/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/SourceSessionTests.cs
@@ -78,7 +78,7 @@ private TestSourceDataCooker CreateCooker(
[UnitTest]
public void Constructor_NullSourceParser_Throws()
{
- Assert.ThrowsException(
+ Assert.ThrowsExactly(
() => new SourceProcessingSession(null));
}
@@ -88,7 +88,7 @@ public void Constructor_NullSourceParserId_Throws()
{
var sourceParser = new TestSourceParser();
- Assert.ThrowsException(
+ Assert.ThrowsExactly(
() => new SourceProcessingSession(sourceParser));
}
@@ -109,7 +109,7 @@ public void RegisterSourceDataCooker_NullCooker_Throws()
var sourceParser = new TestSourceParser() { Id = "TestSourceParser" };
var sourceSession = new SourceProcessingSession(sourceParser);
- Assert.ThrowsException(
+ Assert.ThrowsExactly(
() => sourceSession.RegisterSourceDataCooker(null));
}
diff --git a/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/TableExtensionReferenceTests.cs b/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/TableExtensionReferenceTests.cs
index 90d6db4c2..83ce774d2 100644
--- a/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/TableExtensionReferenceTests.cs
+++ b/src/Microsoft.Performance.SDK.Runtime.Tests/Extensibility/TableExtensionReferenceTests.cs
@@ -28,13 +28,13 @@ public void WhenDisposed_EverthingThrows()
sut.Dispose();
- Assert.ThrowsException(() => sut.Availability);
- Assert.ThrowsException(() => sut.BuildTableAction);
- Assert.ThrowsException(() => sut.DependencyReferences);
- Assert.ThrowsException(() => sut.IsDataAvailableFunc);
- Assert.ThrowsException(() => sut.TableDescriptor);
+ Assert.ThrowsExactly(() => sut.Availability);
+ Assert.ThrowsExactly(() => sut.BuildTableAction);
+ Assert.ThrowsExactly(() => sut.DependencyReferences);
+ Assert.ThrowsExactly(() => sut.IsDataAvailableFunc);
+ Assert.ThrowsExactly(() => sut.TableDescriptor);
- Assert.ThrowsException(() => sut.ProcessDependencies(new TestDataExtensionRepository()));
+ Assert.ThrowsExactly(() => sut.ProcessDependencies(new TestDataExtensionRepository()));
}
finally
{
diff --git a/src/Microsoft.Performance.SDK.Runtime.Tests/Options/PluginOptionsSystemTests.cs b/src/Microsoft.Performance.SDK.Runtime.Tests/Options/PluginOptionsSystemTests.cs
index 893ca8d6c..7793fca78 100644
--- a/src/Microsoft.Performance.SDK.Runtime.Tests/Options/PluginOptionsSystemTests.cs
+++ b/src/Microsoft.Performance.SDK.Runtime.Tests/Options/PluginOptionsSystemTests.cs
@@ -102,7 +102,7 @@ public async Task TrySaveCurrentRegistry_LoaderFails_FailsToSave()
[DataRow(@"C:\Foo\:bar.json")]
public void BadFilePath_ThrowsArgumentException(string filePath)
{
- Assert.ThrowsException(() =>
+ Assert.ThrowsExactly(() =>
{
PluginOptionsSystem.CreateForFile(null, (_) => new NullLogger());
});
@@ -111,7 +111,7 @@ public void BadFilePath_ThrowsArgumentException(string filePath)
[TestMethod]
public void LongFilePath_ThrowsPathTooLongException()
{
- Assert.ThrowsException(() =>
+ Assert.ThrowsExactly(() =>
{
PluginOptionsSystem.CreateForFile(Path.Combine(@"C:\", new string('a', 50000), "foo.json"), (_) => new NullLogger());
});
@@ -120,7 +120,7 @@ public void LongFilePath_ThrowsPathTooLongException()
[TestMethod]
public void UnknownNetworkPath_ThrowsDirectoryNotFoundException()
{
- Assert.ThrowsException(() =>
+ Assert.ThrowsExactly(() =>
{
PluginOptionsSystem.CreateForFile(@"\\randomServer\C$\foo.json", (_) => new NullLogger());
});
diff --git a/src/Microsoft.Performance.SDK.Runtime.Tests/Options/StreamPluginOptionsLoaderTests.cs b/src/Microsoft.Performance.SDK.Runtime.Tests/Options/StreamPluginOptionsLoaderTests.cs
index 6c0c3eaeb..f3c32cdfa 100644
--- a/src/Microsoft.Performance.SDK.Runtime.Tests/Options/StreamPluginOptionsLoaderTests.cs
+++ b/src/Microsoft.Performance.SDK.Runtime.Tests/Options/StreamPluginOptionsLoaderTests.cs
@@ -63,7 +63,7 @@ public async Task CloseStreamOnRead_ClosesStream()
await sut.TryLoadAsync();
- Assert.ThrowsException(() => stream.Position);
+ Assert.ThrowsExactly(() => stream.Position);
Assert.IsFalse(stream.CanRead);
Assert.IsFalse(stream.CanSeek);
Assert.IsFalse(stream.CanWrite);
diff --git a/src/Microsoft.Performance.SDK.Runtime.Tests/Options/StreamPluginOptionsSaverTests.cs b/src/Microsoft.Performance.SDK.Runtime.Tests/Options/StreamPluginOptionsSaverTests.cs
index 728f73fcc..7d4ca0db5 100644
--- a/src/Microsoft.Performance.SDK.Runtime.Tests/Options/StreamPluginOptionsSaverTests.cs
+++ b/src/Microsoft.Performance.SDK.Runtime.Tests/Options/StreamPluginOptionsSaverTests.cs
@@ -57,7 +57,7 @@ public async Task CloseStreamOnWrite_ClosesStream()
var success = await sut.TrySaveAsync(TestPluginOptionDto.PluginOptionsDto());
Assert.IsTrue(success);
- Assert.ThrowsException(() => stream.Position);
+ Assert.ThrowsExactly(() => stream.Position);
Assert.IsFalse(stream.CanRead);
Assert.IsFalse(stream.CanSeek);
Assert.IsFalse(stream.CanWrite);
diff --git a/src/Microsoft.Performance.SDK.Runtime.Tests/ProcessingSourceExecutorTests.cs b/src/Microsoft.Performance.SDK.Runtime.Tests/ProcessingSourceExecutorTests.cs
index c11ed380d..310148328 100644
--- a/src/Microsoft.Performance.SDK.Runtime.Tests/ProcessingSourceExecutorTests.cs
+++ b/src/Microsoft.Performance.SDK.Runtime.Tests/ProcessingSourceExecutorTests.cs
@@ -41,7 +41,7 @@ public void Cleanup()
[UnitTest]
public void ExecuteWithNullExecutionContextThrows()
{
- Assert.ThrowsException(
+ Assert.ThrowsExactly(
() => this.Sut.InitializeCustomDataProcessor(null));
}
@@ -74,7 +74,7 @@ public void ExecuteSourceThatReturnsNullThrows()
Any.ProcessorEnvironment(),
ProcessorOptions.Default);
- Assert.ThrowsException(
+ Assert.ThrowsExactly(
() => this.Sut.InitializeCustomDataProcessor(executionContext));
}
diff --git a/src/Microsoft.Performance.SDK.Runtime.Tests/ProcessingSourceReferenceTests.cs b/src/Microsoft.Performance.SDK.Runtime.Tests/ProcessingSourceReferenceTests.cs
index 59f2013e0..e42041c90 100644
--- a/src/Microsoft.Performance.SDK.Runtime.Tests/ProcessingSourceReferenceTests.cs
+++ b/src/Microsoft.Performance.SDK.Runtime.Tests/ProcessingSourceReferenceTests.cs
@@ -25,7 +25,7 @@ public class ProcessingSourceReferenceTests
[UnitTest]
public void TryCreateReferenceForNullTypeThrows()
{
- Assert.ThrowsException