diff --git a/Directory.Packages.props b/Directory.Packages.props index 6beb132e85..a84164d03e 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -9,7 +9,6 @@ - @@ -39,6 +38,7 @@ + diff --git a/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj b/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj index 3f60f45482..305d22d969 100644 --- a/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj +++ b/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj @@ -67,7 +67,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj b/ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj index d92e79c75d..849406f392 100644 --- a/ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj +++ b/ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj @@ -39,7 +39,7 @@ - + all diff --git a/ILSpy.Tests/CommandLineArgumentsTests.cs b/ILSpy.Tests/CommandLineArgumentsTests.cs index 20704250ce..eb99f59fe2 100644 --- a/ILSpy.Tests/CommandLineArgumentsTests.cs +++ b/ILSpy.Tests/CommandLineArgumentsTests.cs @@ -1,6 +1,6 @@ using System; -using FluentAssertions; +using Shouldly; using ICSharpCode.ILSpy.AppEnv; @@ -16,27 +16,28 @@ public void VerifyEmptyArgumentsArray() { var cmdLineArgs = CommandLineArguments.Create(new string[] { }); - cmdLineArgs.AssembliesToLoad.Should().BeEmpty(); - cmdLineArgs.SingleInstance.Should().BeNull(); - cmdLineArgs.NavigateTo.Should().BeNull(); - cmdLineArgs.Search.Should().BeNull(); - cmdLineArgs.Language.Should().BeNull(); - cmdLineArgs.NoActivate.Should().BeFalse(); - cmdLineArgs.ConfigFile.Should().BeNull(); + cmdLineArgs.AssembliesToLoad.ShouldBeEmpty(); + cmdLineArgs.SingleInstance.ShouldBeNull(); + cmdLineArgs.NavigateTo.ShouldBeNull(); + cmdLineArgs.Search.ShouldBeNull(); + cmdLineArgs.Language.ShouldBeNull(); + cmdLineArgs.NoActivate.ShouldBeFalse(); + cmdLineArgs.ConfigFile.ShouldBeNull(); } [Test] public void VerifyHelpOption() { var cmdLineArgs = CommandLineArguments.Create(new string[] { "--help" }); - cmdLineArgs.ArgumentsParser.IsShowingInformation.Should().BeTrue(); + cmdLineArgs.ArgumentsParser.IsShowingInformation.ShouldBeTrue(); } [Test] public void VerifyForceNewInstanceOption() { var cmdLineArgs = CommandLineArguments.Create(new string[] { "--newinstance" }); - cmdLineArgs.SingleInstance.Should().BeFalse(); + cmdLineArgs.SingleInstance.ShouldNotBeNull(); + cmdLineArgs.SingleInstance.Value.ShouldBeFalse(); } [Test] @@ -44,14 +45,14 @@ public void VerifyNavigateToOption() { const string navigateTo = "MyNamespace.MyClass"; var cmdLineArgs = CommandLineArguments.Create(new string[] { "--navigateto", navigateTo }); - cmdLineArgs.NavigateTo.Should().BeEquivalentTo(navigateTo); + cmdLineArgs.NavigateTo.ShouldBe(navigateTo); } [Test] public void VerifyNavigateToOption_NoneTest_Matching_VSAddin() { var cmdLineArgs = CommandLineArguments.Create(new string[] { "--navigateto:none" }); - cmdLineArgs.NavigateTo.Should().BeEquivalentTo("none"); + cmdLineArgs.NavigateTo.ShouldBe("none"); } [Test] @@ -59,7 +60,7 @@ public void VerifyCaseSensitivityOfOptionsDoesntThrow() { var cmdLineArgs = CommandLineArguments.Create(new string[] { "--navigateTo:none" }); - cmdLineArgs.ArgumentsParser.RemainingArguments.Should().HaveCount(1); + cmdLineArgs.ArgumentsParser.RemainingArguments.Count.ShouldBe(1); } [Test] @@ -67,7 +68,7 @@ public void VerifySearchOption() { const string searchWord = "TestContainers"; var cmdLineArgs = CommandLineArguments.Create(new string[] { "--search", searchWord }); - cmdLineArgs.Search.Should().BeEquivalentTo(searchWord); + cmdLineArgs.Search.ShouldBe(searchWord); } [Test] @@ -75,7 +76,7 @@ public void VerifyLanguageOption() { const string language = "csharp"; var cmdLineArgs = CommandLineArguments.Create(new string[] { "--language", language }); - cmdLineArgs.Language.Should().BeEquivalentTo(language); + cmdLineArgs.Language.ShouldBe(language); } [Test] @@ -83,21 +84,21 @@ public void VerifyConfigOption() { const string configFile = "myilspyoptions.xml"; var cmdLineArgs = CommandLineArguments.Create(new string[] { "--config", configFile }); - cmdLineArgs.ConfigFile.Should().BeEquivalentTo(configFile); + cmdLineArgs.ConfigFile.ShouldBe(configFile); } [Test] public void VerifyNoActivateOption() { var cmdLineArgs = CommandLineArguments.Create(new string[] { "--noactivate" }); - cmdLineArgs.NoActivate.Should().BeTrue(); + cmdLineArgs.NoActivate.ShouldBeTrue(); } [Test] public void MultipleAssembliesAsArguments() { var cmdLineArgs = CommandLineArguments.Create(new string[] { "assembly1", "assembly2", "assembly3" }); - cmdLineArgs.AssembliesToLoad.Should().HaveCount(3); + cmdLineArgs.AssembliesToLoad.Count.ShouldBe(3); } [Test] @@ -117,9 +118,10 @@ public void PassAtFileArguments() { } - cmdLineArgs.SingleInstance.Should().BeFalse(); - cmdLineArgs.NoActivate.Should().BeTrue(); - cmdLineArgs.AssembliesToLoad.Should().HaveCount(3); + cmdLineArgs.SingleInstance.ShouldNotBeNull(); + cmdLineArgs.SingleInstance.Value.ShouldBeFalse(); + cmdLineArgs.NoActivate.ShouldBeTrue(); + cmdLineArgs.AssembliesToLoad.Count.ShouldBe(3); } } } diff --git a/ILSpy.Tests/ILSpy.Tests.csproj b/ILSpy.Tests/ILSpy.Tests.csproj index 8340c2b46a..7fff3f2eb1 100644 --- a/ILSpy.Tests/ILSpy.Tests.csproj +++ b/ILSpy.Tests/ILSpy.Tests.csproj @@ -74,7 +74,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - +