Skip to content

Commit 683d9b0

Browse files
authored
Merge pull request #404 from AArnott/libtemplateUpdate
Merge latest Library.Template
2 parents 8767da8 + c21fd26 commit 683d9b0

16 files changed

+28
-24
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ updates:
77
directory: /
88
schedule:
99
interval: weekly
10+
ignore:
11+
# This package has unlisted versions on nuget.org that are not supported. Avoid them.
12+
- dependency-name: dotnet-format
13+
versions: ["6.x", "7.x", "8.x"]

Directory.Packages.props

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
55
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
66

7-
<MicroBuildVersion>2.0.130</MicroBuildVersion>
7+
<MicroBuildVersion>2.0.131</MicroBuildVersion>
88
<CodeAnalysisVersionForAnalyzers>3.11.0</CodeAnalysisVersionForAnalyzers>
99
<CodeAnalysisVersion>4.6.0</CodeAnalysisVersion>
1010
<CodefixTestingVersion>1.1.1</CodefixTestingVersion>
@@ -36,11 +36,11 @@
3636
<PackageVersion Include="System.Reflection.Emit" Version="4.7.0" />
3737
<PackageVersion Include="System.Reflection.Metadata" Version="7.0.0" />
3838
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="7.0.0" />
39-
<PackageVersion Include="xunit.extensibility.execution" Version="2.4.2" />
40-
<PackageVersion Include="xunit.runner.console" Version="2.4.2" />
41-
<PackageVersion Include="xunit.runner.visualstudio" Version="2.4.5" />
39+
<PackageVersion Include="xunit.extensibility.execution" Version="2.5.0" />
40+
<PackageVersion Include="xunit.runner.console" Version="2.5.0" />
41+
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.0" />
4242
<PackageVersion Include="Xunit.SkippableFact" Version="1.4.13" />
43-
<PackageVersion Include="xunit" Version="2.4.2" />
43+
<PackageVersion Include="xunit" Version="2.5.0" />
4444
</ItemGroup>
4545
<ItemGroup Condition="'$(IsAnalyzerProject)'=='true'">
4646
<!-- Analyzers need to use older references to work in existing C# compilers. -->

azure-pipelines/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232

3333
- template: install-dependencies.yml
3434

35-
- script: dotnet tool run nbgv cloud -ca
35+
- script: dotnet nbgv cloud -ca
3636
displayName: ⚙ Set build number
3737

3838
- ${{ if eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9') }}:

test/Microsoft.VisualStudio.Composition.Tests/AttributedPartDiscoveryTestBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public void NonSharedPartProduction()
2424
{
2525
ComposablePartDefinition? result = this.DiscoveryService.CreatePart(typeof(NonSharedPart));
2626
Assert.NotNull(result);
27-
Assert.Equal(1, result!.ExportedTypes.Count);
27+
Assert.Single(result!.ExportedTypes);
2828
Assert.Empty(result.ImportingMembers);
2929
Assert.False(result.IsShared);
3030
}
@@ -34,7 +34,7 @@ public void SharedPartProduction()
3434
{
3535
ComposablePartDefinition? result = this.DiscoveryService.CreatePart(typeof(SharedPart));
3636
Assert.NotNull(result);
37-
Assert.Equal(1, result!.ExportedTypes.Count);
37+
Assert.Single(result!.ExportedTypes);
3838
Assert.Empty(result.ImportingMembers);
3939
Assert.True(result.IsShared);
4040
}

test/Microsoft.VisualStudio.Composition.Tests/ComposableCatalogTests2.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public async Task CreateFromTypesOmitsNonParts(PartDiscovery discovery)
5050
{
5151
var catalog = ComposableCatalog.Create(discovery.Resolver).AddParts(
5252
await discovery.CreatePartsAsync(typeof(NonExportingType), typeof(ExportingType)));
53-
Assert.Equal(1, catalog.Parts.Count);
53+
Assert.Single(catalog.Parts);
5454
Assert.Equal(typeof(ExportingType), catalog.Parts.Single().Type);
5555
}
5656

@@ -63,7 +63,7 @@ public void AddPartNullThrows()
6363
[Fact]
6464
public void GetAssemblyInputs_Empty()
6565
{
66-
Assert.Equal(0, TestUtilities.EmptyCatalog.GetInputAssemblies().Count);
66+
Assert.Empty(TestUtilities.EmptyCatalog.GetInputAssemblies());
6767
}
6868

6969
[Theory]

test/Microsoft.VisualStudio.Composition.Tests/CompositionFailedExceptionTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public void ExceptionIsSerializable()
2626
try
2727
{
2828
configuration.ThrowOnErrors();
29-
Assert.True(false, "Expected exception not thrown.");
29+
Assert.Fail("Expected exception not thrown.");
3030
}
3131
catch (CompositionFailedException ex)
3232
{

test/Microsoft.VisualStudio.Composition.Tests/DisposablePartsTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public class UninstantiatedNonSharedPart : IDisposable
147147
{
148148
public UninstantiatedNonSharedPart()
149149
{
150-
Assert.False(true, "This should never be instantiated.");
150+
Assert.Fail("This should never be instantiated.");
151151
}
152152

153153
public void Dispose()
@@ -176,7 +176,7 @@ public void PartDisposedWhenThrows(IContainer container)
176176
try
177177
{
178178
container.GetExportedValue<ThrowingPart>();
179-
Assert.False(true, "An exception should have been thrown.");
179+
Assert.Fail("An exception should have been thrown.");
180180
}
181181
catch { }
182182

test/Microsoft.VisualStudio.Composition.Tests/ExportingMembersTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public void ExportedMethodFuncOf2WrongTypeArgs(IContainer container)
150150
try
151151
{
152152
container.GetExportedValue<Func<string, string, bool>>("Method");
153-
Assert.False(true, "Expected exception not thrown.");
153+
Assert.Fail("Expected exception not thrown.");
154154
}
155155
catch (MefV1.ImportCardinalityMismatchException) { }
156156
catch (Microsoft.VisualStudio.Composition.CompositionFailedException) { } // V2/V3

test/Microsoft.VisualStudio.Composition.Tests/FaultyPartsTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ private static void AssertThrowsV1(Func<object?> action)
310310
try
311311
{
312312
action();
313-
Assert.False(true, "Expected exception not thrown.");
313+
Assert.Fail("Expected exception not thrown.");
314314
}
315315
catch (CompositionFailedException ex)
316316
{

test/Microsoft.VisualStudio.Composition.Tests/ImportManyTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public void ImportManyIListWithNone(IContainer container)
103103
var extendable = container.GetExportedValue<ExtendableIList>();
104104
Assert.NotNull(extendable);
105105
Assert.NotNull(extendable.Extensions);
106-
Assert.Equal(0, extendable.Extensions.Count);
106+
Assert.Empty(extendable.Extensions);
107107
}
108108

109109
[MefFact(CompositionEngines.V2Compat, typeof(ExtendableIList), typeof(ExtensionOne))]
@@ -112,7 +112,7 @@ public void ImportManyIListWithOne(IContainer container)
112112
var extendable = container.GetExportedValue<ExtendableIList>();
113113
Assert.NotNull(extendable);
114114
Assert.NotNull(extendable.Extensions);
115-
Assert.Equal(1, extendable.Extensions.Count);
115+
Assert.Single(extendable.Extensions);
116116
Assert.IsAssignableFrom<ExtensionOne>(extendable.Extensions.Single());
117117
}
118118

0 commit comments

Comments
 (0)