diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml
index d157828c..71e0d355 100644
--- a/.github/workflows/build-test.yml
+++ b/.github/workflows/build-test.yml
@@ -6,13 +6,17 @@ on:
release-version:
required: true
type: string
- default: '0.0.0'
cache-build:
required: false
type: boolean
default: false
workflow_dispatch:
-
+ inputs:
+ release-version:
+ required: false
+ description: A version number to test manual builds. e.g. 1.2.3
+ type: string
+ default: '1.2.3'
env:
SOLUTION_FILE_PATH: .\src
BUILD_CONFIGURATION: Release
@@ -21,66 +25,31 @@ jobs:
build_test_publish:
name: Build and run unit tests
runs-on: windows-2022
- env:
- NUnitVersion: '3.16.3'
steps:
- - name: Install NUnit Console Runner and VS project extension
- run: |
- Install-Package NUnit.ConsoleRunner -Force -RequiredVersion $env:NUnitVersion
- Install-Package NUnit.Extension.VSProjectLoader -Force -RequiredVersion '3.9.0'
-
- name: Git configuration
run: git config --global core.autocrlf false
- uses: actions/checkout@v4
- - name: Add MSBuild for VS 2022 to PATH
- uses: microsoft/setup-msbuild@v2
- with:
- vs-version: '[17.2,18.0)'
-
- name: Restore NuGet packages
- working-directory: ${{env.GITHUB_WORKSPACE}}
- run: nuget restore $env:SOLUTION_FILE_PATH
+ working-directory: ${{env.SOLUTION_FILE_PATH}}
+ run: dotnet restore
- name: Show version
run: echo "Building version ${{ inputs.release-version }}"
- - name: Get number version
- env:
- ReleaseVersion: ${{ inputs.release-version }}
- run: |
- $numberVersion = .\GetNumberVersion -Version ${{env.ReleaseVersion}}
- echo "Setting numberVersion to $numberVersion"
- echo "NUMBER_VERSION=$numberVersion" >> $env:GITHUB_ENV
-
- - name: Set fileversion on all .NET Framework assemblies and assembly version on the exe
- env:
- ReleaseVersion: ${{ inputs.release-version }}
- run: |
- $sbeFileName = "$env:GITHUB_WORKSPACE\src\ServiceBusExplorer\Properties\AssemblyInfo.cs"
- .\SetVersion -FileName $sbeFileName -PropertyName 'AssemblyVersion' -Version ${{env.NUMBER_VERSION}}
- .\SetVersion -FileName $sbeFileName -PropertyName 'AssemblyFileVersion' -Version ${{env.NUMBER_VERSION}}
- .\SetVersion -FileName $sbeFileName -PropertyName 'AssemblyInformationalVersion' -VersionString ${{env.ReleaseVersion}}
-
- $commonInfoFile = "$env:GITHUB_WORKSPACE\src\Common\Properties\AssemblyInfo.cs"
- .\SetVersion -FileName $commonInfoFile -PropertyName 'AssemblyFileVersion' -Version ${{env.NUMBER_VERSION}}
- .\SetVersion -FileName $commonInfoFile -PropertyName 'AssemblyInformationalVersion' -VersionString ${{env.ReleaseVersion}}
-
- $notificationHubsInfoFile = "$env:GITHUB_WORKSPACE\src\NotificationHubs\Properties\AssemblyInfo.cs"
- .\SetVersion -FileName $notificationHubsInfoFile -PropertyName 'AssemblyFileVersion' -Version ${{env.NUMBER_VERSION}}
- .\SetVersion -FileName $notificationHubsInfoFile -PropertyName 'AssemblyInformationalVersion' -VersionString ${{env.ReleaseVersion}}
-
- name: Build
- run: |
- msbuild /m /property:Configuration=${{env.BUILD_CONFIGURATION}},FileVersion=${{env.NUMBER_VERSION}},InformationalVersion=${{inputs.release-version}} ${{env.SOLUTION_FILE_PATH}}
+ working-directory: ${{env.SOLUTION_FILE_PATH}}
+ run: >-
+ dotnet build -c ${{env.BUILD_CONFIGURATION}}
+ -p:InformationalVersion=${{inputs.release-version}}
+ -p:FileVersion=${{inputs.release-version}}
- name: Run tests
- run: |
- $process = Start-Process -FilePath "C:\Program Files\PackageManagement\NuGet\Packages\NUnit.ConsoleRunner.$env:NUnitVersion\tools\nunit3-console.exe" -ArgumentList "$env:GITHUB_WORKSPACE\src\ServiceBusExplorer.Tests\ServiceBusExplorer.Tests.csproj", "--config=${{env.BUILD_CONFIGURATION}}" -PassThru
- Wait-Process -InputObject $process
- Get-Content -Path .\TestResult.xml
- if ($process.ExitCode -ne 0) {throw "Unit tests failed (exit code = $($process.ExitCode))" }
+ env:
+ FILE_VERSION: ${{inputs.release-version}}
+ working-directory: ${{env.SOLUTION_FILE_PATH}}
+ run: dotnet test -c ${{env.BUILD_CONFIGURATION}} --no-build --no-restore
- name: Cache build
uses: actions/cache@v3.0.11
diff --git a/src/Common/Common.csproj b/src/Common/Common.csproj
index 63f84f53..1e16205a 100644
--- a/src/Common/Common.csproj
+++ b/src/Common/Common.csproj
@@ -6,7 +6,7 @@
net472
latest
bin\$(Configuration)\
- false
+ 1.0.0.1
full
diff --git a/src/Common/Properties/AssemblyInfo.cs b/src/Common/Properties/AssemblyInfo.cs
deleted file mode 100644
index f2c04b65..00000000
--- a/src/Common/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Common")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("Common")]
-[assembly: AssemblyCopyright("Copyright © 2019")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("de07dbeb-d772-49ba-bceb-a7ce29308ae3")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("0.0.0.0")]
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
new file mode 100644
index 00000000..7fb3d384
--- /dev/null
+++ b/src/Directory.Build.props
@@ -0,0 +1,10 @@
+
+
+ false
+ false
+ false
+ false
+ false
+ true
+
+
diff --git a/src/EventGridExplorerLibrary/EventGridExplorerLibrary.csproj b/src/EventGridExplorerLibrary/EventGridExplorerLibrary.csproj
index fbc18121..d576b37b 100644
--- a/src/EventGridExplorerLibrary/EventGridExplorerLibrary.csproj
+++ b/src/EventGridExplorerLibrary/EventGridExplorerLibrary.csproj
@@ -3,11 +3,14 @@
Library
netstandard2.0
+ 1.0.0.1
+ EventGridExplorerLibrary
+ ServiceBusExplorer.EventGridExplorerLibrary
-
+
@@ -15,7 +18,7 @@
-
+
diff --git a/src/EventHubs/EventHubs.csproj b/src/EventHubs/EventHubs.csproj
index d9fef0cc..258851d5 100644
--- a/src/EventHubs/EventHubs.csproj
+++ b/src/EventHubs/EventHubs.csproj
@@ -1,22 +1,16 @@
-
-
- netstandard2.0
- 7.3
- ServiceBusExplorer.EventHubs
- ServiceBusExplorer.EventHubs
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ netstandard2.0
+ 7.3
+ ServiceBusExplorer.EventHubs
+ ServiceBusExplorer.EventHubs
+ 1.0.0.1
+
+
+
+
+
+
+
diff --git a/src/NotificationHubs/NotificationHubs.csproj b/src/NotificationHubs/NotificationHubs.csproj
index 8baa1fd7..e2b3f63e 100644
--- a/src/NotificationHubs/NotificationHubs.csproj
+++ b/src/NotificationHubs/NotificationHubs.csproj
@@ -1,42 +1,42 @@
-
- {E836C914-9BFE-4C1C-96E5-6A414CDEF485}
- ServiceBusExplorer.NotificationHubs
- ServiceBusExplorer.NotificationHubs
- net472
- NotificationHubs
- NotificationHubs
- Copyright © 2019
- bin\$(Configuration)\
- false
-
-
- full
-
-
- pdbonly
-
-
-
-
-
-
-
-
-
-
-
-
-
- ExeInternalDependencyValidation.layerdiagram
- False
-
-
- AssemblyDependencyValidation.layerdiagram
- False
-
-
-
-
-
+
+ {E836C914-9BFE-4C1C-96E5-6A414CDEF485}
+ ServiceBusExplorer.NotificationHubs
+ ServiceBusExplorer.NotificationHubs
+ 1.0.0.1
+ net472
+ NotificationHubs
+ NotificationHubs
+ Copyright © 2019
+ bin\$(Configuration)\
+
+
+ full
+
+
+ pdbonly
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ExeInternalDependencyValidation.layerdiagram
+ False
+
+
+ AssemblyDependencyValidation.layerdiagram
+ False
+
+
+
+
+
diff --git a/src/NotificationHubs/Properties/AssemblyInfo.cs b/src/NotificationHubs/Properties/AssemblyInfo.cs
deleted file mode 100644
index 6f8af905..00000000
--- a/src/NotificationHubs/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("NotificationHubs")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("NotificationHubs")]
-[assembly: AssemblyCopyright("Copyright © 2019")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("e836c914-9bfe-4c1c-96e5-6a414cdef485")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("0.0.0.0")]
diff --git a/src/Relay/Relay.csproj b/src/Relay/Relay.csproj
index 6be0eea2..89ac58de 100644
--- a/src/Relay/Relay.csproj
+++ b/src/Relay/Relay.csproj
@@ -1,20 +1,14 @@
-
-
- netstandard2.0
- 7.3
- ServiceBusExplorer.Relay
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ netstandard2.0
+ 7.3
+ ServiceBusExplorer.Relay
+ 1.0.0.1
+
+
+
+
+
+
+
diff --git a/src/ServiceBus/ServiceBus.csproj b/src/ServiceBus/ServiceBus.csproj
index d4e7ece4..a8f1bc8f 100644
--- a/src/ServiceBus/ServiceBus.csproj
+++ b/src/ServiceBus/ServiceBus.csproj
@@ -1,19 +1,14 @@
-
-
- netstandard2.0
- ServiceBusExplorer.ServiceBus
-
-
-
-
-
-
-
-
-
-
-
-
+
+ netstandard2.0
+ ServiceBusExplorer.ServiceBus
+ 1.0.0.1
+
+
+
+
+
+
+
diff --git a/src/ServiceBusExplorer.Tests/AssemblyVersionShould.cs b/src/ServiceBusExplorer.Tests/AssemblyVersionShould.cs
new file mode 100644
index 00000000..99e053ff
--- /dev/null
+++ b/src/ServiceBusExplorer.Tests/AssemblyVersionShould.cs
@@ -0,0 +1,56 @@
+using FluentAssertions;
+using System;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+using System.Xml;
+using Xunit;
+
+namespace ServiceBusExplorer.Tests
+{
+ public class AssemblyVersionShould
+ {
+ private const string CSharpProjectExtension = ".csproj";
+
+ [Fact]
+ public void BeSameAsSetInProject()
+ {
+ var assemblyNames = Directory.GetFiles(".", "ServiceBus*.*")
+ .Where(x=>x.EndsWith(".dll") || x.EndsWith(".exe"));
+
+ var projectFiles = Directory.GetFiles("../../../../", $"*{CSharpProjectExtension}", SearchOption.AllDirectories);
+
+ var xmlDocument = new XmlDocument();
+
+ var expectedVersions = projectFiles.Select(x =>
+ {
+ xmlDocument.Load(x);
+ var assemblyVersionNode = xmlDocument.SelectSingleNode("//AssemblyVersion");
+ var assemblyNameNode = xmlDocument.SelectSingleNode("//AssemblyName");
+
+ return new
+ {
+ assemblyName = assemblyNameNode?.InnerText ?? ExtractProjectName(x),
+ assemblyVersion= assemblyVersionNode.InnerText
+ };
+ }).ToArray() ;
+
+ var actualAssemblyVersions = assemblyNames.Select(x=>
+ {
+ var assembly = Assembly.LoadFrom(x);
+ return new
+ {
+ assemblyName = assembly.GetName().Name,
+ assemblyVersion = assembly.GetName().Version.ToString()
+ };
+ }).ToArray();
+
+ actualAssemblyVersions.Should().HaveCount(9).And.BeEquivalentTo(expectedVersions);
+ }
+
+ private string ExtractProjectName(string x)
+ {
+ return new FileInfo(x).Name.Replace(CSharpProjectExtension, string.Empty);
+ }
+ }
+}
diff --git a/src/ServiceBusExplorer.Tests/FileVersionShould.cs b/src/ServiceBusExplorer.Tests/FileVersionShould.cs
new file mode 100644
index 00000000..cc67be42
--- /dev/null
+++ b/src/ServiceBusExplorer.Tests/FileVersionShould.cs
@@ -0,0 +1,35 @@
+using FluentAssertions;
+using System;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using Xunit;
+
+namespace ServiceBusExplorer.Tests
+{
+ public class FileVersionShould
+ {
+ private string expectedVersion;
+
+ public FileVersionShould()
+ {
+#if DEBUG
+ expectedVersion = Environment.GetEnvironmentVariable("FILE_VERSION") ?? "1.0.0.1";
+#else
+ expectedVersion = Environment.GetEnvironmentVariable("FILE_VERSION") ?? throw new InvalidOperationException("file version not set by environment");
+#endif
+ }
+
+
+ [Fact]
+ public void FileShouldHaveSameVersionAsProvidedByBuild()
+ {
+ var assemblyNames = Directory.GetFiles(".", "ServiceBus*.*")
+ .Where(x => x.EndsWith(".dll") || x.EndsWith(".exe"));
+
+ var fileVersions = assemblyNames.Select(x => FileVersionInfo.GetVersionInfo(x).FileVersion);
+
+ fileVersions.Should().HaveCount(9).And.AllBeEquivalentTo(expectedVersion);
+ }
+ }
+}
diff --git a/src/ServiceBusExplorer.Tests/Helpers/ConversionHelperTests.cs b/src/ServiceBusExplorer.Tests/Helpers/ConversionHelperTests.cs
index e73911b6..ea1c62c8 100644
--- a/src/ServiceBusExplorer.Tests/Helpers/ConversionHelperTests.cs
+++ b/src/ServiceBusExplorer.Tests/Helpers/ConversionHelperTests.cs
@@ -2,49 +2,48 @@
using System;
using System.Globalization;
-using ServiceBusExplorer.Helpers;
using ServiceBusExplorer.Utilities.Helpers;
-using NUnit.Framework;
+using FluentAssertions;
+using Xunit;
#endregion
namespace ServiceBusExplorer.Tests.Helpers
{
- [TestFixture]
public class ConversionHelperTests
{
- [Test]
+ [Fact]
public void MapStringTypeToCLRType_ValueIsGuidObject_ReturnsEqualGuidObject()
{
var guid = new Guid("2E9DB8C4-8803-4BD7-B860-8932CF13835E");
var convertedGuid = ConversionHelper.MapStringTypeToCLRType("Guid", guid);
- Assert.AreEqual(guid, convertedGuid);
+ convertedGuid.Should().BeEquivalentTo(guid);
}
- [Test]
+ [Fact]
public void MapStringTypeToCLRType_ValueIsGuidString_ReturnsEqualGuidObject()
{
var guidStr = "2E9DB8C4-8803-4BD7-B860-8932CF13835E";
var convertedGuid = ConversionHelper.MapStringTypeToCLRType("Guid", guidStr);
- Assert.AreEqual(guidStr.ToLower(), convertedGuid.ToString());
+ convertedGuid.ToString().Should().BeEquivalentTo(guidStr);
}
[Theory]
- [TestCase("00:00:00")]
- [TestCase("3:44:55")]
- [TestCase("03:44:55")]
- [TestCase("1:00:00:00.0000000")] // one day
+ [InlineData("00:00:00")]
+ [InlineData("3:44:55")]
+ [InlineData("03:44:55")]
+ [InlineData("1:00:00:00.0000000")] // one day
public void MapStringTypeToCLRType_ValueIsTimeSpanString_ReturnsEqualTimespanObject(string timespanStr)
{
var convertedTimespan = ConversionHelper.MapStringTypeToCLRType("TimeSpan", timespanStr);
- Assert.AreEqual(convertedTimespan, TimeSpan.Parse(timespanStr, CultureInfo.InvariantCulture));
+ convertedTimespan.Should().BeEquivalentTo(TimeSpan.Parse(timespanStr, CultureInfo.InvariantCulture));
}
- [Test]
+ [Fact]
public void MapStringTypeToCLRType_ValueIsTimeSpan_ReturnsEqualTimespanObject()
{
var convertedTimespan = ConversionHelper.MapStringTypeToCLRType("TimeSpan", TimeSpan.Zero);
- Assert.AreEqual(convertedTimespan, TimeSpan.Zero);
+ convertedTimespan.Should().Be(TimeSpan.Zero);
}
}
}
diff --git a/src/ServiceBusExplorer.Tests/Helpers/JsonSerializerHelperTest.cs b/src/ServiceBusExplorer.Tests/Helpers/JsonSerializerHelperTest.cs
index 6ad08d44..c063fbcd 100644
--- a/src/ServiceBusExplorer.Tests/Helpers/JsonSerializerHelperTest.cs
+++ b/src/ServiceBusExplorer.Tests/Helpers/JsonSerializerHelperTest.cs
@@ -1,39 +1,38 @@
-using ServiceBusExplorer.Helpers;
-using ServiceBusExplorer.Utilities.Helpers;
-using NUnit.Framework;
+using ServiceBusExplorer.Utilities.Helpers;
+using FluentAssertions;
+using Xunit;
namespace ServiceBusExplorer.Tests.Helpers
{
- [TestFixture]
public class JsonSerializerHelperTest
{
- [Test]
+ [Fact]
public void IsJson_ReturnsFalse_WhenNullInput()
{
var result = JsonSerializerHelper.IsJson(null);
- Assert.AreEqual(result, false);
+ result.Should().BeFalse();
}
- [Test]
+ [Fact]
public void IndentJson_ValueIsNotJson_ReturnsOriginalString()
{
var myOriginalString = "This is a full text string that is not a JSON";
var indented = JsonSerializerHelper.Indent(myOriginalString);
- Assert.AreEqual(indented, myOriginalString);
+ indented.Should().Be(myOriginalString);
}
- [Test]
+ [Fact]
public void IndentJson_ValueIsXml_ReturnsOriginalString()
{
var myOriginalString = "XML tileA tile made from some classical XML content.";
var indented = JsonSerializerHelper.Indent(myOriginalString);
- Assert.AreEqual(indented, myOriginalString);
+ indented.Should().Be(myOriginalString);
}
- [Test]
+ [Fact]
public void IndentJson_ValueIsJson_ReturnsIndentedString()
{
var json = "{prop1:\"val1\",prop2:2,\"prop3\":[1, 2, 3],prop4:{subProp1:1,subProp2:\"string\",subProp3:[\"a\",\"b\",\"c\"]}}";
@@ -57,10 +56,10 @@ public void IndentJson_ValueIsJson_ReturnsIndentedString()
}";
var indented = JsonSerializerHelper.Indent(json);
- Assert.AreEqual(indented, expectedResult);
+ indented.Should().Be(expectedResult);
}
- [Test]
+ [Fact]
public void IndentJson_ValueIsJson_DoesNotChangeDateFormat()
{
var json = @"{""dateIso"":""2018-05-14T00:00:00Z"",""dateMicrosoft"":""/Date(1526256000000)/""}";
@@ -70,20 +69,20 @@ public void IndentJson_ValueIsJson_DoesNotChangeDateFormat()
}";
var indented = JsonSerializerHelper.Indent(json);
- Assert.AreEqual(expectedResult, indented);
+ expectedResult.Should().Be(indented);
}
- [Test]
+ [Fact]
public void IndentJson_ValueIsMalformedJson_ReturnsOriginalJson()
{
var json = @"{""Field1"":""Value1"",""Field1"":""Value2""}";
var expectedResult = @"{""Field1"":""Value1"",""Field1"":""Value2""}";
var indented = JsonSerializerHelper.Indent(json);
- Assert.AreEqual(expectedResult, indented);
+ expectedResult.Should().Be(indented);
}
- [Test]
+ [Fact]
public void IndentJson_ValueHasTypeHandling_ReturnsIndentedStringWithTypeHandling()
{
var json = "{\"$type\":\"MyAwesomeLibrary.MyAwesomeClass\",prop1:1,prop2:2,obj:{\"$type\":\"MyAwesomeLibrary.MyOtherAwesomeClass\",default:true}}";
@@ -98,7 +97,7 @@ public void IndentJson_ValueHasTypeHandling_ReturnsIndentedStringWithTypeHandlin
}";
var indented = JsonSerializerHelper.Indent(json);
- Assert.AreEqual(indented, expectedResult);
+ indented.Should().Be(expectedResult);
}
}
}
diff --git a/src/ServiceBusExplorer.Tests/Helpers/ServiceBusHelperTest.cs b/src/ServiceBusExplorer.Tests/Helpers/ServiceBusHelperTest.cs
index 7ffdd265..0f1c6003 100644
--- a/src/ServiceBusExplorer.Tests/Helpers/ServiceBusHelperTest.cs
+++ b/src/ServiceBusExplorer.Tests/Helpers/ServiceBusHelperTest.cs
@@ -1,147 +1,175 @@
#region Using Directives
-using ServiceBusExplorer;
using System;
-using NUnit.Framework;
using Microsoft.ServiceBus.Messaging;
using System.IO;
+using FluentAssertions;
+using Xunit;
#endregion
namespace ServiceBusExplorer.Tests.Helpers
{
- [TestFixture]
public class ServiceBusHelperTest
{
- [Test]
+ [Fact]
public void GetAddressRelativeToNamespace_AbsoluteUriUnderNamespace_ReturnsRelativePath()
{
- var helper = new ServiceBusHelper((m, a) => { });
- helper.NamespaceUri = new Uri("sb://aaa.test.com/");
+ var helper = new ServiceBusHelper((m, a) => { })
+ {
+ NamespaceUri = new Uri("sb://aaa.test.com/")
+ };
- Assert.That(helper.GetAddressRelativeToNamespace("sb://aaa.test.com/some/path/segments/name"), Is.EqualTo("some/path/segments/name"));
+ helper.GetAddressRelativeToNamespace("sb://aaa.test.com/some/path/segments/name").Should().Be("some/path/segments/name");
}
- [Test]
+ [Fact]
public void GetAddressRelativeToNamespace_AbsoluteUriUnderNamespaceTrailingSlash_ReturnsRelativePathWithTrailingSlash()
{
- var helper = new ServiceBusHelper((m, a) => { });
- helper.NamespaceUri = new Uri("sb://aaa.test.com/");
+ var helper = new ServiceBusHelper((m, a) => { })
+ {
+ NamespaceUri = new Uri("sb://aaa.test.com/")
+ };
- Assert.That(helper.GetAddressRelativeToNamespace("sb://aaa.test.com/some/path/segments/name/"), Is.EqualTo("some/path/segments/name/"));
+ helper.GetAddressRelativeToNamespace("sb://aaa.test.com/some/path/segments/name/").Should().Be("some/path/segments/name/");
}
- [Test]
+ [Fact]
public void GetAddressRelativeToNamespace_AbsoluteUriUnderNamespace_Different_Scheme_ReturnsRelativePath()
{
- var helper = new ServiceBusHelper((m, a) => { });
- helper.NamespaceUri = new Uri("sb://aaa.test.com/");
+ var helper = new ServiceBusHelper((m, a) => { })
+ {
+ NamespaceUri = new Uri("sb://aaa.test.com/")
+ };
- Assert.That(helper.GetAddressRelativeToNamespace("http://aaa.test.com/some/path/segments/name"), Is.EqualTo("some/path/segments/name"));
+ helper.GetAddressRelativeToNamespace("http://aaa.test.com/some/path/segments/name").Should().Be("some/path/segments/name");
}
- [Test]
+ [Fact]
public void GetAddressRelativeToNamespace_AbsoluteUriUnderNamespace_Different_Scheme_Port_Specified_ReturnsRelativePath()
{
- var helper = new ServiceBusHelper((m, a) => { });
- helper.NamespaceUri = new Uri("sb://aaa.test.com:80/");
+ var helper = new ServiceBusHelper((m, a) => { })
+ {
+ NamespaceUri = new Uri("sb://aaa.test.com:80/")
+ };
- Assert.That(helper.GetAddressRelativeToNamespace("http://aaa.test.com:80/some/path/segments/name"), Is.EqualTo("some/path/segments/name"));
+ helper.GetAddressRelativeToNamespace("http://aaa.test.com:80/some/path/segments/name").Should().Be("some/path/segments/name");
}
- [TestCase(":80", ":81")]
- [TestCase(":80", "")]
- [TestCase("", ":80")]
+ [Theory]
+ [InlineData(":80", ":81")]
+ [InlineData(":80", "")]
+ [InlineData("", ":80")]
public void GetAddressRelativeToNamespace_AbsoluteUriUnderNamespace_Different_Scheme_Different_Port_ReturnsLastSegment(string namespacePort, string port)
{
- var helper = new ServiceBusHelper((m, a) => { });
- helper.NamespaceUri = new Uri($"sb://aaa.test.com{namespacePort}/");
+ var helper = new ServiceBusHelper((m, a) => { })
+ {
+ NamespaceUri = new Uri($"sb://aaa.test.com{namespacePort}/")
+ };
- Assert.That(helper.GetAddressRelativeToNamespace($"http://aaa.test.com{port}/some/path/segments/name"), Is.EqualTo("some/path/segments/name"));
+ helper.GetAddressRelativeToNamespace($"http://aaa.test.com{port}/some/path/segments/name").Should().Be("some/path/segments/name");
}
- [Test]
+ [Fact]
public void GetAddressRelativeToNamespace_AbsoluteUriNotUnderNamespace_ReturnsLastSegment()
{
- var helper = new ServiceBusHelper((m, a) => { });
- helper.NamespaceUri = new Uri("sb://aaa.test.com/");
+ var helper = new ServiceBusHelper((m, a) => { })
+ {
+ NamespaceUri = new Uri("sb://aaa.test.com/")
+ };
- Assert.That(helper.GetAddressRelativeToNamespace("sb://bbb.test.com/some/path/segments/name"), Is.EqualTo("name"));
+ helper.GetAddressRelativeToNamespace("sb://bbb.test.com/some/path/segments/name").Should().Be("name");
}
- [Test]
+ [Fact]
public void GetAddressRelativeToNamespace_AbsoluteUriNotUnderNamespaceTrailingSlash_ReturnsLastSegmentWithTrailingSlash()
{
- var helper = new ServiceBusHelper((m, a) => { });
- helper.NamespaceUri = new Uri("sb://aaa.test.com/");
+ var helper = new ServiceBusHelper((m, a) => { })
+ {
+ NamespaceUri = new Uri("sb://aaa.test.com/")
+ };
- Assert.That(helper.GetAddressRelativeToNamespace("sb://bbb.test.com/some/path/segments/name/"), Is.EqualTo("name/"));
+ helper.GetAddressRelativeToNamespace("sb://bbb.test.com/some/path/segments/name/").Should().Be("name/");
}
- [Test]
+ [Fact]
public void GetAddressRelativeToNamespace_RelativeUriWithMultipleSegments_ReturnsLastSegment()
{
- var helper = new ServiceBusHelper((m, a) => { });
- helper.NamespaceUri = new Uri("sb://aaa.test.com/");
+ var helper = new ServiceBusHelper((m, a) => { })
+ {
+ NamespaceUri = new Uri("sb://aaa.test.com/")
+ };
- Assert.That(helper.GetAddressRelativeToNamespace("some/path/segments/name"), Is.EqualTo("name"));
+ helper.GetAddressRelativeToNamespace("some/path/segments/name").Should().Be("name");
}
- [Test]
+ [Fact]
public void GetAddressRelativeToNamespace_RelativeUriWithMultipleSegmentsTrailingSlash_ReturnsLastSegmentWithTrailingSlash()
{
- var helper = new ServiceBusHelper((m, a) => { });
- helper.NamespaceUri = new Uri("sb://aaa.test.com/");
+ var helper = new ServiceBusHelper((m, a) => { })
+ {
+ NamespaceUri = new Uri("sb://aaa.test.com/")
+ };
- Assert.That(helper.GetAddressRelativeToNamespace("some/path/segments/name/"), Is.EqualTo("name/"));
+ helper.GetAddressRelativeToNamespace("some/path/segments/name/").Should().Be("name/");
}
- [Test]
+ [Fact]
public void GetAddressRelativeToNamespace_RelativeUriWithSingleSegment_ReturnsSegment()
{
- var helper = new ServiceBusHelper((m, a) => { });
- helper.NamespaceUri = new Uri("sb://aaa.test.com/");
+ var helper = new ServiceBusHelper((m, a) => { })
+ {
+ NamespaceUri = new Uri("sb://aaa.test.com/")
+ };
- Assert.That(helper.GetAddressRelativeToNamespace("name"), Is.EqualTo("name"));
+ helper.GetAddressRelativeToNamespace("name").Should().Be("name");
}
- [Test]
+ [Fact]
public void GetAddressRelativeToNamespace_RelativeUriWithSingleSegmentAndTrailingSlash_ReturnsSegment()
{
- var helper = new ServiceBusHelper((m, a) => { });
- helper.NamespaceUri = new Uri("sb://aaa.test.com/");
+ var helper = new ServiceBusHelper((m, a) => { })
+ {
+ NamespaceUri = new Uri("sb://aaa.test.com/")
+ };
- Assert.That(helper.GetAddressRelativeToNamespace("name/"), Is.EqualTo("name/"));
+ helper.GetAddressRelativeToNamespace("name/").Should().Be("name/");
}
- [Test]
+ [Fact]
public void GetAddressRelativeToNamespace_Slash_ReturnsSlash()
{
- var helper = new ServiceBusHelper((m, a) => { });
- helper.NamespaceUri = new Uri("sb://aaa.test.com/");
+ var helper = new ServiceBusHelper((m, a) => { })
+ {
+ NamespaceUri = new Uri("sb://aaa.test.com/")
+ };
- Assert.That(helper.GetAddressRelativeToNamespace("/"), Is.EqualTo("/"));
+ helper.GetAddressRelativeToNamespace("/").Should().Be("/");
}
- [Test]
+ [Fact]
public void GetAddressRelativeToNamespace_Empty_ReturnsEmpty()
{
- var helper = new ServiceBusHelper((m, a) => { });
- helper.NamespaceUri = new Uri("sb://aaa.test.com/");
+ var helper = new ServiceBusHelper((m, a) => { })
+ {
+ NamespaceUri = new Uri("sb://aaa.test.com/")
+ };
- Assert.That(helper.GetAddressRelativeToNamespace(""), Is.EqualTo(""));
+ helper.GetAddressRelativeToNamespace("").Should().Be("");
}
- [Test]
+ [Fact]
public void GetAddressRelativeToNamespace_Whitespace_ReturnsWhitespace()
{
- var helper = new ServiceBusHelper((m, a) => { });
- helper.NamespaceUri = new Uri("sb://aaa.test.com/");
+ var helper = new ServiceBusHelper((m, a) => { })
+ {
+ NamespaceUri = new Uri("sb://aaa.test.com/")
+ };
- Assert.That(helper.GetAddressRelativeToNamespace(" "), Is.EqualTo(" "));
+ helper.GetAddressRelativeToNamespace(" ").Should().Be(" ");
}
- [Test]
+ [Fact]
public void GetMessageText_ProtobufMessage_WindowsAzureServiceApi_ByteArray()
{
var expectedBodyType = BodyType.ByteArray;
@@ -152,12 +180,12 @@ public void GetMessageText_ProtobufMessage_WindowsAzureServiceApi_ByteArray()
var brokeredMessage = new BrokeredMessage(message);
var actualMessageText = helper.GetMessageText(brokeredMessage, false, out var actualBodyType);
- Assert.AreEqual(expectedBodyType, actualBodyType);
- Assert.NotNull(actualMessageText);
- Assert.IsFalse(string.IsNullOrWhiteSpace(actualMessageText));
+ expectedBodyType.Should().Be(actualBodyType);
+ actualMessageText.Should().NotBeNull();
+ actualMessageText.Should().NotBeNullOrWhiteSpace();
}
- [Test]
+ [Fact]
public void GetMessageText_ProtobufMessage_WindowsAzureServiceApi_ReadonlyMemoryByte()
{
var expectedBodyType = BodyType.Stream;
@@ -168,9 +196,9 @@ public void GetMessageText_ProtobufMessage_WindowsAzureServiceApi_ReadonlyMemory
var brokeredMessage = new BrokeredMessage(message);
var actualMessageText = helper.GetMessageText(brokeredMessage, false, out var actualBodyType);
- Assert.AreEqual(expectedBodyType, actualBodyType);
- Assert.NotNull(actualMessageText);
- Assert.IsFalse(string.IsNullOrWhiteSpace(actualMessageText));
+ expectedBodyType.Should().Be(actualBodyType);
+ actualMessageText.Should().NotBeNull();
+ actualMessageText.Should().NotBeNullOrWhiteSpace();
}
///
@@ -186,7 +214,7 @@ public void GetMessageText_ProtobufMessage_WindowsAzureServiceApi_ReadonlyMemory
/// a string that a human can read
/// readable string" fffff�(@
///
- [Test]
+ [Fact]
public void GetMessageText_ProtobufMessage_AzureMessagingServiceBus()
{
var expectedBodyType = BodyType.Stream;
@@ -197,16 +225,16 @@ public void GetMessageText_ProtobufMessage_AzureMessagingServiceBus()
var brokeredMessage = new BrokeredMessage(new MemoryStream(message));
var actualMessageText = helper.GetMessageText(brokeredMessage, false, out var actualBodyType);
- Assert.AreEqual(expectedBodyType, actualBodyType);
- Assert.NotNull(actualMessageText);
- Assert.IsFalse(string.IsNullOrWhiteSpace(actualMessageText));
+ expectedBodyType.Should().Be(actualBodyType);
+ actualMessageText.Should().NotBeNull();
+ actualMessageText.Should().NotBeNullOrWhiteSpace();
}
static byte[] CreateProtobufTestMessage()
{
// Due to incompatibility with .net 462 it is not possible to generate a protobuf message inside the code.
- return new byte[]
- {
+ return
+ [
10,
12,
8,
@@ -293,7 +321,7 @@ static byte[] CreateProtobufTestMessage()
230,
40,
64
- };
+ ];
}
}
}
diff --git a/src/ServiceBusExplorer.Tests/Helpers/TwoFilesConfigurationTests.cs b/src/ServiceBusExplorer.Tests/Helpers/TwoFilesConfigurationTests.cs
index 1017b67e..e057e271 100644
--- a/src/ServiceBusExplorer.Tests/Helpers/TwoFilesConfigurationTests.cs
+++ b/src/ServiceBusExplorer.Tests/Helpers/TwoFilesConfigurationTests.cs
@@ -8,7 +8,8 @@
using ServiceBusExplorer.Helpers;
using ServiceBusExplorer.Utilities.Helpers;
using Microsoft.ServiceBus;
-using NUnit.Framework;
+using FluentAssertions;
+using Xunit;
namespace ServiceBusExplorer.Tests.Helpers
@@ -27,7 +28,6 @@ public enum Crustacean
Lobster
}
- [TestFixture]
public class TwoFilesConfigurationTests
{
#region Constants
@@ -146,8 +146,8 @@ public TwoFilesConfigurationTests()
#endregion
#region Public methods
- [SetUp]
- public void Setup()
+ //TODO: Refactor Setup
+ private void Setup()
{
// Reset application config file. It does not work well just making a copy
// of the application config file since it may have been modified by a previous
@@ -163,7 +163,7 @@ public void Setup()
}
- [Test]
+ [Fact]
public void TestBoolValuesReadAndWrite()
{
foreach (var configFileUse in configFileUses)
@@ -200,7 +200,7 @@ public void TestBoolValuesReadAndWrite()
}
}
- [Test]
+ [Fact]
public void TestEnumValuesReadAndWrite()
{
foreach (var configFileUse in configFileUses)
@@ -239,7 +239,7 @@ public void TestEnumValuesReadAndWrite()
}
}
- [Test]
+ [Fact]
public void TestDecimalValuesReadAndWrite()
{
foreach (var configFileUse in configFileUses)
@@ -277,7 +277,7 @@ public void TestDecimalValuesReadAndWrite()
}
}
- [Test]
+ [Fact]
public void TestIntValuesReadAndWrite()
{
foreach (var configFileUse in configFileUses)
@@ -319,7 +319,7 @@ public void TestIntValuesReadAndWrite()
}
}
- [Test]
+ [Fact]
public void TestStringValuesReadAndWrite()
{
foreach (var configFileUse in configFileUses)
@@ -356,7 +356,7 @@ public void TestStringValuesReadAndWrite()
}
}
- [Test]
+ [Fact]
public void TestHashtableSectionReadAndWrite()
{
const string NonExistingSpecies = "NonexistingSpecies";
@@ -438,7 +438,7 @@ public void TestHashtableSectionReadAndWrite()
}
}
- [Test]
+ [Fact]
public void TestMessagingNamespacesReadAndWrite()
{
foreach (var configFileUse in configFileUses)
@@ -452,24 +452,25 @@ public void TestMessagingNamespacesReadAndWrite()
// Test reading config values - both application config and user config are missing
var namespaces = ServiceBusNamespace.GetMessagingNamespaces(configuration, writeToLog);
- Assert.AreEqual(0, namespaces.Count);
- Assert.IsTrue(logInMemory.Contains("Service bus accounts have not been properly configured"));
+ namespaces.Should().BeEmpty();
+
+ logInMemory.Should().Contain("Service bus accounts have not been properly configured");
logInMemory = string.Empty;
// Create two connection strings in the user file or the application file depending upon
// configFileUse.
SaveConnectionString(configuration, IndexNamespaceAdded1);
SaveConnectionString(configuration, IndexNamespaceAdded2);
- Assert.IsEmpty(logInMemory);
+ logInMemory.Should().BeEmpty();
- namespaces = ServiceBusNamespace.GetMessagingNamespaces
- (configuration, writeToLog);
- Assert.IsEmpty(logInMemory);
- Assert.AreEqual(2, namespaces.Count);
- Assert.AreEqual(fakeConnectionStrings[IndexNamespaceAdded1].Value,
- namespaces[KeyNamespaceAdded1].ConnectionString);
- Assert.AreEqual(fakeConnectionStrings[IndexNamespaceAdded2].Value,
- namespaces[KeyNamespaceAdded2].ConnectionString);
+ namespaces = ServiceBusNamespace.GetMessagingNamespaces(configuration, writeToLog);
+ namespaces.Should().HaveCount(2);
+
+ logInMemory.Should().BeEmpty();
+
+
+ fakeConnectionStrings[IndexNamespaceAdded1].Value.Should().Be(namespaces[KeyNamespaceAdded1].ConnectionString);
+ fakeConnectionStrings[IndexNamespaceAdded2].Value.Should().Be(namespaces[KeyNamespaceAdded2].ConnectionString);
// Add a connection to the application config file, but let the two connection
@@ -481,19 +482,16 @@ public void TestMessagingNamespacesReadAndWrite()
if (UseApplicationConfig(configFileUse))
{
- Assert.AreEqual(3, namespaces.Count);
- Assert.AreEqual(fakeConnectionStrings[IndexSecondNamespaceInBothFiles].Value,
- namespaces[KeyNamespaceInBothFiles].ConnectionString);
+ namespaces.Should().HaveCount(3);
+ fakeConnectionStrings[IndexSecondNamespaceInBothFiles].Value.Should().Be(namespaces[KeyNamespaceInBothFiles].ConnectionString);
}
else
{
- Assert.AreEqual(2, namespaces.Count);
+ namespaces.Should().HaveCount(2);
}
- Assert.AreEqual(fakeConnectionStrings[IndexNamespaceAdded1].Value,
- namespaces[KeyNamespaceAdded1].ConnectionString);
- Assert.AreEqual(fakeConnectionStrings[IndexNamespaceAdded2].Value,
- namespaces[KeyNamespaceAdded2].ConnectionString);
+ fakeConnectionStrings[IndexNamespaceAdded1].Value.Should().Be(namespaces[KeyNamespaceAdded1].ConnectionString);
+ fakeConnectionStrings[IndexNamespaceAdded2].Value.Should().Be(namespaces[KeyNamespaceAdded2].ConnectionString);
// Add a connection string to the user file with the same index as an existing entry
@@ -505,13 +503,11 @@ public void TestMessagingNamespacesReadAndWrite()
configuration= TwoFilesConfiguration.Create(GetUserSettingsFilePath(), configFileUse);
namespaces = ServiceBusNamespace.GetMessagingNamespaces(configuration, writeToLog);
- Assert.AreEqual(3, namespaces.Count);
- Assert.AreEqual(fakeConnectionStrings[IndexNamespaceAdded1].Value,
- namespaces[KeyNamespaceAdded1].ConnectionString);
- Assert.AreEqual(fakeConnectionStrings[IndexNamespaceAdded2].Value,
- namespaces[KeyNamespaceAdded2].ConnectionString);
- Assert.AreEqual(fakeConnectionStrings[IndexFirstNamespaceInBothFiles].Value,
- namespaces[KeyNamespaceInBothFiles].ConnectionString);
+ namespaces.Should().HaveCount(3);
+ fakeConnectionStrings[IndexNamespaceAdded1].Value.Should().Be(namespaces[KeyNamespaceAdded1].ConnectionString);
+ fakeConnectionStrings[IndexNamespaceAdded2].Value.Should().Be(namespaces[KeyNamespaceAdded2].ConnectionString);
+
+ fakeConnectionStrings[IndexFirstNamespaceInBothFiles].Value.Should().Be(namespaces[KeyNamespaceInBothFiles].ConnectionString);
// Add a connection string to the application file
SaveConnectionStringInApplicationFile(IndexNamespaceInAppFile1);
@@ -523,21 +519,18 @@ public void TestMessagingNamespacesReadAndWrite()
// two having the same key.
if (UseApplicationConfig(configFileUse))
{
- Assert.AreEqual(4, namespaces.Count);
- Assert.AreEqual(fakeConnectionStrings[IndexNamespaceInAppFile1].Value,
- namespaces[KeyNamespaceInAppFile1].ConnectionString);
+ namespaces.Should().HaveCount(4);
+ fakeConnectionStrings[IndexNamespaceInAppFile1].Value.Should().Be(namespaces[KeyNamespaceInAppFile1].ConnectionString);
}
else
{
- Assert.AreEqual(3, namespaces.Count);
+ namespaces.Should().HaveCount(3);
}
- Assert.AreEqual(fakeConnectionStrings[IndexNamespaceAdded1].Value,
- namespaces[KeyNamespaceAdded1].ConnectionString);
- Assert.AreEqual(fakeConnectionStrings[IndexNamespaceAdded2].Value,
- namespaces[KeyNamespaceAdded2].ConnectionString);
- Assert.AreEqual(fakeConnectionStrings[IndexFirstNamespaceInBothFiles].Value,
- namespaces[KeyNamespaceInBothFiles].ConnectionString);
+ fakeConnectionStrings[IndexNamespaceAdded1].Value.Should().Be(namespaces[KeyNamespaceAdded1].ConnectionString);
+ fakeConnectionStrings[IndexNamespaceAdded2].Value.Should().Be(namespaces[KeyNamespaceAdded2].ConnectionString);
+
+ fakeConnectionStrings[IndexFirstNamespaceInBothFiles].Value.Should().Be(namespaces[KeyNamespaceInBothFiles].ConnectionString);
// Delete the user file so reading will only be from the application file
@@ -547,38 +540,33 @@ public void TestMessagingNamespacesReadAndWrite()
if (UseApplicationConfig(configFileUse))
{
- Assert.IsEmpty(logInMemory);
+ logInMemory.Should().BeEmpty();
}
else
{
- Assert.IsTrue(logInMemory.Contains("not been properly configured"));
+ logInMemory.Should().Contain("not been properly configured");
}
if (UseApplicationConfig(configFileUse))
{
- Assert.AreEqual(configFileUse == ConfigFileUse.ApplicationConfig ? 4 : 2, namespaces.Count);
+ (configFileUse == ConfigFileUse.ApplicationConfig ? 4 : 2).Should().Be(namespaces.Count);
if (configFileUse == ConfigFileUse.ApplicationConfig)
{
- Assert.AreEqual(fakeConnectionStrings[IndexNamespaceAdded1].Value,
- namespaces[KeyNamespaceAdded1].ConnectionString);
- Assert.AreEqual(fakeConnectionStrings[IndexNamespaceAdded2].Value,
- namespaces[KeyNamespaceAdded2].ConnectionString);
- Assert.AreEqual(fakeConnectionStrings[IndexFirstNamespaceInBothFiles].Value,
- namespaces[KeyNamespaceInBothFiles].ConnectionString);
+ fakeConnectionStrings[IndexNamespaceAdded1].Value.Should().Be(namespaces[KeyNamespaceAdded1].ConnectionString);
+ fakeConnectionStrings[IndexNamespaceAdded2].Value.Should().Be(namespaces[KeyNamespaceAdded2].ConnectionString);
+ fakeConnectionStrings[IndexFirstNamespaceInBothFiles].Value.Should().Be(namespaces[KeyNamespaceInBothFiles].ConnectionString);
}
else
{
- Assert.AreEqual(fakeConnectionStrings[IndexSecondNamespaceInBothFiles].Value,
- namespaces[KeyNamespaceInBothFiles].ConnectionString);
+ fakeConnectionStrings[IndexSecondNamespaceInBothFiles].Value.Should().Be(namespaces[KeyNamespaceInBothFiles].ConnectionString);
}
-
- Assert.AreEqual(fakeConnectionStrings[IndexNamespaceInAppFile1].Value,
- namespaces[KeyNamespaceInAppFile1].ConnectionString);
+
+ fakeConnectionStrings[IndexNamespaceInAppFile1].Value.Should().Be(namespaces[KeyNamespaceInAppFile1].ConnectionString);
}
else
{
- Assert.AreEqual(0, namespaces.Count);
+ namespaces.Should().BeEmpty();
}
}
}
@@ -654,10 +642,9 @@ void RemoveNamespaceSectionFromApplicationFile()
void SaveConnectionString(TwoFilesConfiguration configuration, int index)
{
- Assert.IsEmpty(logInMemory);
- ServiceBusNamespace.SaveConnectionString(configuration, fakeConnectionStrings[index].Key,
- fakeConnectionStrings[index].Value, writeToLog);
- Assert.IsEmpty(logInMemory);
+ logInMemory.Should().BeEmpty();
+ ServiceBusNamespace.SaveConnectionString(configuration, fakeConnectionStrings[index].Key, fakeConnectionStrings[index].Value, writeToLog);
+ logInMemory.Should().BeEmpty();
}
void DeleteUserConfigFile()
@@ -671,16 +658,17 @@ void TestReadingBoolValues(TwoFilesConfiguration configuration, bool configHasBe
// Get a value that do not exist in the application config file defaulting to true
var nonExistingValueAsTrue = configuration.GetBoolValue(KeyDoesNotExistAnywhere, true, writeToLog);
- Assert.AreEqual(true, nonExistingValueAsTrue);
+ true.Should().Be(nonExistingValueAsTrue);
// Get a value that do not exist in the application config file defaulting to false
var nonExistingValueAsFalse = configuration.GetBoolValue(KeyDoesNotExistAnywhere, false, writeToLog);
- Assert.AreEqual(false, nonExistingValueAsFalse);
+ false.Should().Be(nonExistingValueAsFalse);
// Get the value from the user file defaulting to true. If userFileShouldHaveUseAsciiKeyAsFalse
// is false then we should read from the application config and that value should be true
var useAsciiDefTrue = configuration.GetBoolValue(KeyIsInitiallyTrueInAppConfig, true, writeToLog);
- Assert.AreEqual(!configHasBeenModified, useAsciiDefTrue);
+
+ configHasBeenModified.Should().NotBe(useAsciiDefTrue);
// Get a value from that initially only exist in the application file defaulting to false
var useAsciiDefFalse = configuration.GetBoolValue(KeyIsInitiallyTrueInAppConfig, false, writeToLog);
@@ -695,23 +683,23 @@ void TestReadingBoolValues(TwoFilesConfiguration configuration, bool configHasBe
expectedUseAsciiDef = false;
}
- Assert.AreEqual(expectedUseAsciiDef, useAsciiDefFalse);
+ expectedUseAsciiDef.Should().Be(useAsciiDefFalse);
// Get a value that does not exist in the user file
var savePropertiesToFile = configuration.GetBoolValue(keyOnlyInAppConfig, false, writeToLog);
if (UseApplicationConfig(configuration.ConfigFileUse))
{
- Assert.AreEqual(savePropertiesToFile, true);
+ savePropertiesToFile.Should().BeTrue();
}
else
{
- Assert.AreEqual(savePropertiesToFile, false);
+ savePropertiesToFile.Should().BeFalse();
}
// Get a value that will only exist in the user file
var onlyInUserFile = configuration.GetBoolValue(KeyIsAddedAndSetToTrueBeforeSecondTest, false, writeToLog);
- Assert.AreEqual(onlyInUserFile, configHasBeenModified);
+ onlyInUserFile.Should().Be(configHasBeenModified);
}
void TestReadingEnumValues(TwoFilesConfiguration configuration, bool configHasBeenModified)
@@ -719,30 +707,27 @@ void TestReadingEnumValues(TwoFilesConfiguration configuration, bool configHasBe
const string keyOnlyInAppConfig = "monster";
// Get a value that do not exist in any of the config files using default
- var nonExistingValueAsDefault = configuration.GetEnumValue(KeyDoesNotExistAnywhere,
- default(RelayType), writeToLog);
- Assert.AreEqual(RelayType.None, nonExistingValueAsDefault);
+ var nonExistingValueAsDefault = configuration.GetEnumValue(KeyDoesNotExistAnywhere, default(RelayType), writeToLog);
+
+ RelayType.None.Should().Be(nonExistingValueAsDefault);
// Get a value that do not exist in any of the config files defaulting to false
- var nonExistingValueAsNetEvent = configuration.GetEnumValue(KeyDoesNotExistAnywhere,
- RelayType.NetEvent, writeToLog);
- Assert.AreEqual(RelayType.NetEvent, nonExistingValueAsNetEvent);
+ var nonExistingValueAsNetEvent = configuration.GetEnumValue(KeyDoesNotExistAnywhere, RelayType.NetEvent, writeToLog);
+
+ RelayType.NetEvent.Should().Be(nonExistingValueAsNetEvent);
// If configHasBeenModified is false then we should read get the original value which should be
// AutoDetect. Otherwise the value is Https.
- var connectivityMode = configuration.GetEnumValue
- (KeyConnectivityModeWhichWillBeOverriddenOrOverwritten, default, writeToLog);
+ var connectivityMode = configuration.GetEnumValue(KeyConnectivityModeWhichWillBeOverriddenOrOverwritten, default, writeToLog);
if (UseApplicationConfig(configuration.ConfigFileUse))
{
- Assert.AreEqual(configHasBeenModified ?
- ConnectivityMode.Https : ConnectivityMode.AutoDetect, connectivityMode);
+ (configHasBeenModified ? ConnectivityMode.Https : ConnectivityMode.AutoDetect).Should().Be(connectivityMode);
}
else // Just user config file
{
// ConnectivityMode.Http is the default
- Assert.AreEqual(configHasBeenModified ?
- ConnectivityMode.Https : ConnectivityMode.Http, connectivityMode);
+ (configHasBeenModified ? ConnectivityMode.Https : ConnectivityMode.Http).Should().Be(connectivityMode);
}
// Get a value that do exist initially
@@ -751,17 +736,17 @@ void TestReadingEnumValues(TwoFilesConfiguration configuration, bool configHasBe
if (UseApplicationConfig(configuration.ConfigFileUse))
{
- Assert.AreEqual(Monster.KingKong, monster);
+ monster.Should().Be(Monster.KingKong);
}
else
{
- Assert.AreEqual(Monster.Godzilla, monster);
+ monster.Should().Be(Monster.Godzilla);
}
// Get a value that will be added after the first test
- var crustacean = configuration.GetEnumValue(
- KeyCrustaceanIsAddedAndSetToCrabBeforeSecondTest, Crustacean.Shrimp, writeToLog);
- Assert.AreEqual(configHasBeenModified ? Crustacean.Crab : Crustacean.Shrimp, crustacean);
+ var crustacean = configuration.GetEnumValue(KeyCrustaceanIsAddedAndSetToCrabBeforeSecondTest, Crustacean.Shrimp, writeToLog);
+
+ (configHasBeenModified ? Crustacean.Crab : Crustacean.Shrimp).Should().Be(crustacean);
}
void TestReadingIntValues(TwoFilesConfiguration configuration, bool configHasBeenModified)
@@ -772,23 +757,26 @@ void TestReadingIntValues(TwoFilesConfiguration configuration, bool configHasBee
// If the user file exists it should have an invalid value
if (configHasBeenModified)
{
- Assert.IsTrue(configuration.SettingExists(KeyWithInvalidValue));
+ configuration.SettingExists(KeyWithInvalidValue).Should().BeTrue();
+
var shouldBeDefault = configuration.GetIntValue(KeyWithInvalidValue, mediumNumber, writeToLog);
- Assert.AreEqual(mediumNumber, shouldBeDefault);
- Assert.IsTrue(logInMemory.Contains("which cannot be parsed to a(n) System.Int32"));
+
+ mediumNumber.Should().Be(shouldBeDefault);
+
+ logInMemory.Should().Contain("which cannot be parsed to a(n) System.Int32");
logInMemory = string.Empty;
}
// Get a value that do not exist in any config config file defaulting to empty
- Assert.IsFalse(configuration.SettingExists(KeyDoesNotExistAnywhere));
- var nonExistingValueAsDefault = configuration.GetIntValue(KeyDoesNotExistAnywhere,
- default, writeToLog);
- Assert.AreEqual(0, nonExistingValueAsDefault);
+ configuration.SettingExists(KeyDoesNotExistAnywhere).Should().BeFalse();
+ var nonExistingValueAsDefault = configuration.GetIntValue(KeyDoesNotExistAnywhere, default, writeToLog);
+
+ nonExistingValueAsDefault.Should().Be(0);
// Get a value that does not exist in the any config file defaulting to mediumNumber
- var nonExistingValueAsMediumNumber = configuration.GetIntValue(KeyDoesNotExistAnywhere,
- mediumNumber, writeToLog);
- Assert.AreEqual(mediumNumber, nonExistingValueAsMediumNumber);
+ var nonExistingValueAsMediumNumber = configuration.GetIntValue(KeyDoesNotExistAnywhere, mediumNumber, writeToLog);
+
+ mediumNumber.Should().Be(nonExistingValueAsMediumNumber);
// Get the value from the user file defaulting to empty. If configHasBeenModified
// is false then we should read from the application config and that value should be
@@ -799,15 +787,14 @@ void TestReadingIntValues(TwoFilesConfiguration configuration, bool configHasBee
if (UseApplicationConfig(configuration.ConfigFileUse))
{
- expectedLength = configHasBeenModified ?
- (int)ValueSharkLengthSet172 : (int)ValueSharkLengthInitial158;
+ expectedLength = configHasBeenModified ? (int)ValueSharkLengthSet172 : (int)ValueSharkLengthInitial158;
}
else // Just user config
{
expectedLength = configHasBeenModified ? (int)ValueSharkLengthSet172 : default;
}
- Assert.AreEqual(expectedLength, sharkLength);
+ expectedLength.Should().Be(sharkLength);
const int largeNumber = 3450242;
// Get the value from the user file defaulting to a large number
@@ -825,7 +812,7 @@ void TestReadingIntValues(TwoFilesConfiguration configuration, bool configHasBee
}
}
- Assert.AreEqual(expectedLength, sharkLength);
+ expectedLength.Should().Be(sharkLength);
// Get a value that only exists in the application config file
const int valueMorayEelLength = 214;
@@ -833,11 +820,11 @@ void TestReadingIntValues(TwoFilesConfiguration configuration, bool configHasBee
if (UseApplicationConfig(configuration.ConfigFileUse))
{
- Assert.AreEqual(valueMorayEelLength, morayEelLength);
+ valueMorayEelLength.Should().Be(morayEelLength);
}
else
{
- Assert.AreEqual(default(int), morayEelLength);
+ morayEelLength.Should().Be(default);
}
// Get a value that will only exist in the user file or overridden in the application file
@@ -846,7 +833,7 @@ void TestReadingIntValues(TwoFilesConfiguration configuration, bool configHasBee
expectedLength = configHasBeenModified ? (int)ValueWhaleLengthSet634 : mediumNumber;
- Assert.AreEqual(expectedLength, whaleLengthValue);
+ expectedLength.Should().Be(whaleLengthValue);
}
void TestReadingDecimalValues(TwoFilesConfiguration configuration, bool configHasBeenModified)
@@ -855,35 +842,32 @@ void TestReadingDecimalValues(TwoFilesConfiguration configuration, bool configHa
const decimal mediumNumber = 52.88M;
// Get a value that do not exist in the application config file defaulting to empty
- var nonExistingValueAsDefault = configuration.GetDecimalValue(KeyDoesNotExistAnywhere, default,
- writeToLog);
- Assert.AreEqual(nonExistingValueAsDefault, 0);
+ var nonExistingValueAsDefault = configuration.GetDecimalValue(KeyDoesNotExistAnywhere, default, writeToLog);
+
+ nonExistingValueAsDefault.Should().Be(0);
// Get a value that do not exist in the application config file defaulting to mediumNumber
- var nonExistingValueAsMediumNumber = configuration.GetDecimalValue
- (KeyDoesNotExistAnywhere, mediumNumber, writeToLog);
- Assert.AreEqual(nonExistingValueAsMediumNumber, mediumNumber);
+ var nonExistingValueAsMediumNumber = configuration.GetDecimalValue(KeyDoesNotExistAnywhere, mediumNumber, writeToLog);
+
+ nonExistingValueAsMediumNumber.Should().Be(mediumNumber);
// If configHasBeenModified is false then we should read from the application config
// and that value should be ValueSharkWeightInAppConfig. Get the value from the user
// file defaulting to empty.
- var sharkWeight = configuration.GetDecimalValue(KeySharkWeightWhichWillBeOverridden,
- default, writeToLog);
+ var sharkWeight = configuration.GetDecimalValue(KeySharkWeightWhichWillBeOverridden, default, writeToLog);
decimal expectedWeight;
if (UseApplicationConfig(configuration.ConfigFileUse))
{
- expectedWeight = configHasBeenModified ?
- ValueSharkWeightInUserConfig : ValueSharkWeightInAppConfig;
+ expectedWeight = configHasBeenModified ? ValueSharkWeightInUserConfig : ValueSharkWeightInAppConfig;
}
else
{
- expectedWeight = configHasBeenModified ?
- ValueSharkWeightInUserConfig : default;
+ expectedWeight = configHasBeenModified ? ValueSharkWeightInUserConfig : default;
}
- Assert.AreEqual(expectedWeight, sharkWeight);
+ expectedWeight.Should().Be(sharkWeight);
// Get the value from the user file defaulting to a large number
@@ -896,7 +880,7 @@ void TestReadingDecimalValues(TwoFilesConfiguration configuration, bool configHa
expectedWeight = largeNumber;
}
- Assert.AreEqual(expectedWeight, sharkWeight);
+ expectedWeight.Should().Be(sharkWeight);
// Get a value that do not exist in the user file
const decimal morayEelWeightInAppConfig = 588M;
@@ -913,13 +897,13 @@ void TestReadingDecimalValues(TwoFilesConfiguration configuration, bool configHa
expectedMorayEelWeight = default;
}
- Assert.AreEqual(expectedMorayEelWeight, morayEelWeight);
+ expectedMorayEelWeight.Should().Be(morayEelWeight);
// Get a value that does not exist in the application config initially
var onlyInUserFile = configuration.GetDecimalValue(KeyWhaleWeightWillBeAddedBeforeSecondRun,
mediumNumber, writeToLog);
expectedWeight = configHasBeenModified ? ValueWhaleWeight8039And30 : mediumNumber;
- Assert.AreEqual(expectedWeight, onlyInUserFile);
+ expectedWeight.Should().Be(onlyInUserFile);
}
@@ -930,11 +914,11 @@ void TestReadingStringValues(TwoFilesConfiguration configuration, bool configHas
// Get a value that do not exist in the application config file defaulting to empty
var nonExistingValueAsTrue = configuration.GetStringValue(KeyDoesNotExistAnywhere, string.Empty);
- Assert.AreEqual(nonExistingValueAsTrue, string.Empty);
+ nonExistingValueAsTrue.Should().BeEmpty();
// Get a value that do not exist in any config file defaulting to false
var nonExistingValueAsFalse = configuration.GetStringValue(KeyDoesNotExistAnywhere, ExtinctShark);
- Assert.AreEqual(nonExistingValueAsFalse, ExtinctShark);
+ nonExistingValueAsFalse.Should().Be(ExtinctShark);
// Get the value from the user file defaulting to empty. If configHasBeenModified
// is false then we should read from the application config and that value should be
@@ -943,13 +927,11 @@ void TestReadingStringValues(TwoFilesConfiguration configuration, bool configHas
if (UseApplicationConfig(configuration.ConfigFileUse))
{
- Assert.AreEqual(configHasBeenModified ?
- ValueForOverridingShark : SharkValueInAppConfig, sharkSpecies);
+ (configHasBeenModified ? ValueForOverridingShark : SharkValueInAppConfig).Should().Be(sharkSpecies);
}
else // Just user config
{
- Assert.AreEqual(configHasBeenModified ?
- ValueForOverridingShark : string.Empty, sharkSpecies);
+ (configHasBeenModified ? ValueForOverridingShark : string.Empty).Should().Be(sharkSpecies);
}
// Get the value from the user file defaulting to false
@@ -959,13 +941,11 @@ void TestReadingStringValues(TwoFilesConfiguration configuration, bool configHas
if (UseApplicationConfig(configuration.ConfigFileUse))
{
- Assert.AreEqual(configHasBeenModified ?
- ValueForOverridingShark : SharkValueInAppConfig, sharkSpecies);
+ (configHasBeenModified ? ValueForOverridingShark : SharkValueInAppConfig).Should().Be(sharkSpecies);
}
else
{
- Assert.AreEqual(configHasBeenModified ?
- ValueForOverridingShark : valueWhiteTipReefShark, sharkSpecies);
+ (configHasBeenModified ? ValueForOverridingShark : valueWhiteTipReefShark).Should().Be(sharkSpecies);
}
// Get a value that do not exist in the user file
@@ -974,17 +954,17 @@ void TestReadingStringValues(TwoFilesConfiguration configuration, bool configHas
if (UseApplicationConfig(configuration.ConfigFileUse))
{
- Assert.AreEqual(valueGrayWhale, whale);
+ valueGrayWhale.Should().Be(whale);
}
else
{
- Assert.AreEqual(string.Empty, whale);
+ whale.Should().BeEmpty();
}
// Get a value that will only exist in the user file
- var onlyInUserFile = configuration.GetStringValue(KeyIsAddedAndSetToTrueBeforeSecondTest,
- ExtinctShark);
- Assert.AreEqual(onlyInUserFile, configHasBeenModified ? AnotherShark : ExtinctShark);
+ var onlyInUserFile = configuration.GetStringValue(KeyIsAddedAndSetToTrueBeforeSecondTest, ExtinctShark);
+
+ onlyInUserFile.Should().Be(configHasBeenModified ? AnotherShark : ExtinctShark);
}
void TestReadingHashtableSection(TwoFilesConfiguration configuration,
@@ -992,7 +972,7 @@ void TestReadingHashtableSection(TwoFilesConfiguration configuration,
{
// Get a value that do not exist in the application config file defaulting to empty
var nonExistingSection = configuration.GetHashtableFromSection(KeyDoesNotExistAnywhere);
- Assert.AreEqual(nonExistingSection, null);
+ nonExistingSection.Should().BeNull();
var saltWaterFishes = configuration.GetHashtableFromSection(SectionSaltWaterFishesWhichWillBeMerged);
@@ -1002,29 +982,29 @@ void TestReadingHashtableSection(TwoFilesConfiguration configuration,
{
if (!configHasBeenModified)
{
- Assert.AreEqual(2, saltWaterFishes.Count);
- Assert.AreEqual(ValueAlaskaPollockOldScientificName, saltWaterFishes["Alaska pollock"]);
+ saltWaterFishes.Count.Should().Be(2);
+ saltWaterFishes["Alaska pollock"].Should().Be(ValueAlaskaPollockOldScientificName);
}
else
{
- Assert.AreEqual(3, saltWaterFishes.Count);
- Assert.AreEqual(ValueAlaskaPollockNewScientificName, saltWaterFishes["Alaska pollock"]);
- Assert.AreEqual("Scomber scombrus", saltWaterFishes["Atlantic mackerel"]);
+ saltWaterFishes.Count.Should().Be(3);
+ saltWaterFishes["Alaska pollock"].Should().Be(ValueAlaskaPollockNewScientificName);
+ saltWaterFishes["Atlantic mackerel"].Should().Be("Scomber scombrus");
}
- Assert.AreEqual("Scomber colias", saltWaterFishes["Atlantic chub mackerel"]);
+ saltWaterFishes["Atlantic chub mackerel"].Should().Be("Scomber colias");
}
else
{
if (!configHasBeenModified)
{
- Assert.IsNull(saltWaterFishes);
+ saltWaterFishes.Should().BeNull();
}
else
{
- Assert.AreEqual(2, saltWaterFishes.Count);
- Assert.AreEqual("Scomber scombrus", saltWaterFishes["Atlantic mackerel"]);
- Assert.AreEqual(ValueAlaskaPollockNewScientificName, saltWaterFishes["Alaska Pollock"]);
+ saltWaterFishes.Count.Should().Be(2);
+ saltWaterFishes["Atlantic mackerel"].Should().Be("Scomber scombrus");
+ saltWaterFishes["Alaska Pollock"].Should().Be(ValueAlaskaPollockNewScientificName);
}
}
@@ -1036,20 +1016,19 @@ void TestReadingHashtableSection(TwoFilesConfiguration configuration,
{
if (ConfigFileUse.ApplicationConfig == configuration.ConfigFileUse)
{
- Assert.AreEqual(null, freshWaterFishes);
- //Assert.AreEqual(0, freshWaterFishes.Count);
+ freshWaterFishes.Should().BeNull();
}
else
{
- Assert.AreEqual(null, freshWaterFishes);
+ freshWaterFishes.Should().BeNull();
}
}
else
{
- Assert.AreEqual(3, freshWaterFishes.Count);
- Assert.AreEqual("Perca flavescens", freshWaterFishes["Perch"]);
- Assert.AreEqual("Sander lucioperca", freshWaterFishes["Zander"]);
- Assert.AreEqual("Esox lucius", freshWaterFishes["Pike"]);
+ freshWaterFishes.Count.Should().Be(3);
+ freshWaterFishes["Perch"].Should().Be("Perca flavescens");
+ freshWaterFishes["Zander"].Should().Be("Sander lucioperca");
+ freshWaterFishes["Pike"].Should().Be("Esox lucius");
}
}
diff --git a/src/ServiceBusExplorer.Tests/Properties/AssemblyInfo.cs b/src/ServiceBusExplorer.Tests/Properties/AssemblyInfo.cs
deleted file mode 100644
index aecc5a8b..00000000
--- a/src/ServiceBusExplorer.Tests/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("ServiceBusExplorer.Tests")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
-[assembly: AssemblyProduct("ServiceBusExplorer.Tests")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2016")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("ab80c6e1-376c-4e98-8512-5ac9161e932b")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("0.0.0.0")]
diff --git a/src/ServiceBusExplorer.Tests/ServiceBusExplorer.Tests.csproj b/src/ServiceBusExplorer.Tests/ServiceBusExplorer.Tests.csproj
index 0424cc9f..82762c36 100644
--- a/src/ServiceBusExplorer.Tests/ServiceBusExplorer.Tests.csproj
+++ b/src/ServiceBusExplorer.Tests/ServiceBusExplorer.Tests.csproj
@@ -1,34 +1,35 @@
-
- {41D3C27D-37FF-43B8-AAC0-4F483E507698}
- net472
- latest
- ServiceBusExplorer.Tests
- Microsoft
- ServiceBusExplorer.Tests
- Copyright © Microsoft 2016
- bin\$(Configuration)\
- false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ {41D3C27D-37FF-43B8-AAC0-4F483E507698}
+ net472
+ latest
+ ServiceBusExplorer.Tests
+ 1.0.0.1
+ Microsoft
+ ServiceBusExplorer.Tests
+ Copyright © Microsoft 2016
+ bin\$(Configuration)\
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/ServiceBusExplorer.sln b/src/ServiceBusExplorer.sln
index 245e7ea3..7d308d20 100644
--- a/src/ServiceBusExplorer.sln
+++ b/src/ServiceBusExplorer.sln
@@ -8,8 +8,9 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B59933A5-4AE0-4340-9102-578619A93341}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
- ..\LICENSE.txt = ..\LICENSE.txt
+ Directory.Build.props = Directory.Build.props
EventGridExplorer_README.md = EventGridExplorer_README.md
+ ..\LICENSE.txt = ..\LICENSE.txt
..\README.md = ..\README.md
EndProjectSection
EndProject
diff --git a/src/ServiceBusExplorer/Properties/AssemblyInfo.cs b/src/ServiceBusExplorer/Properties/AssemblyInfo.cs
index 1410424b..bedf7f61 100644
--- a/src/ServiceBusExplorer/Properties/AssemblyInfo.cs
+++ b/src/ServiceBusExplorer/Properties/AssemblyInfo.cs
@@ -13,12 +13,9 @@
// associated with an assembly.
[assembly: AssemblyTitle("Service Bus Explorer")]
[assembly: AssemblyDescription("The Service Bus Explorer allows users to connect to a Service Bus namespace and easily administer and test the entities of an Azure Service Bus namespace. The tool provides advanced features like import/export functionality and the ability to test entities.")]
-[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Paolo Salvatori")]
[assembly: AssemblyProduct("Service Bus Explorer")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2017")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
// The following GUID is for the ID of the typelib if this project is exposed to COM
diff --git a/src/ServiceBusExplorer/ServiceBusExplorer.csproj b/src/ServiceBusExplorer/ServiceBusExplorer.csproj
index 2d937bfd..8b3c4de0 100644
--- a/src/ServiceBusExplorer/ServiceBusExplorer.csproj
+++ b/src/ServiceBusExplorer/ServiceBusExplorer.csproj
@@ -1,667 +1,668 @@
-
-
- true
- 8.0.30703
- {32754F39-E353-4607-94FE-B9B9ACFD58EF}
- WinExe
- net472
- false
- true
-
- publish\
- true
- Disk
- false
- Foreground
- 7
- Days
- false
- false
- true
- 0
- 1.0.0.%2a
- false
- false
- true
- 8
- Service Bus Explorer
- Paolo Salvatori
- Service Bus Explorer
- The Service Bus Explorer allows users to connect to a Service Bus namespace and administer messaging entities in an easy manner. The tool provides advanced features like import/export functionality or the ability to test topic, queues, subscriptions, relay services, notification hubs and events hubs.
- Copyright 2017 Paolo Salvatori
- bin\$(Configuration)\
- false
- false
- Paolo Salvatori
-
- servicebusexplorer
-
- https://github.com/paolosalvatori/ServiceBusExplorer
- https://github.com/paolosalvatori/ServiceBusExplorer/releases
- servicebusexplorer azure azureservicebus servicebus explorer eventhub queue subscription relay notificationhub
-
-
- AnyCPU
- full
- true
-
-
- AnyCPU
- pdbonly
-
-
- NewServiceBusExplorerLogo.ico
-
-
-
-
-
- full
- MinimumRecommendedRules.ruleset
-
-
- pdbonly
- MinimumRecommendedRules.ruleset
-
-
- true
- false
- NewServiceBusExplorerLogo.jpg
- https://github.com/paolosalvatori/ServiceBusExplorer
- LICENSE.txt
- app.manifest
-
-
-
- Libraries\FastColoredTextBox.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- UserControl
-
-
- AccidentalDeletionPreventionCheckControl.cs
-
-
- Component
-
-
- UserControl
-
-
- HandleConsumerGroupControl.cs
-
-
- UserControl
-
-
- HandleEventHubControl.cs
-
-
- UserControl
-
-
- HandlePartitionControl.cs
-
-
- UserControl
-
-
- HandleRelayControl.cs
-
-
- UserControl
-
-
- PartitionListenerControl.cs
-
-
- UserControl
-
-
- ListenerControl.cs
-
-
- UserControl
-
-
- HandleNotificationHubControl.cs
-
-
- UserControl
-
-
- Component
-
-
- Component
-
-
- Component
-
-
- Component
-
-
- UserControl
-
-
- TestEventHubControl.cs
-
-
- UserControl
-
-
- TimeSpanControl.cs
-
-
- Component
-
-
- UserControl
-
-
- StandardValueEditorUI.cs
-
-
-
- TestRelayControl.cs
-
-
- UserControl
-
-
- TestSubscriptionControl.cs
-
-
-
- TestQueueControl.cs
-
-
- UserControl
-
-
- TestTopicControl.cs
-
-
- UserControl
-
-
- HandleRuleControl.cs
-
-
- UserControl
-
-
- HandleSubscriptionControl.cs
-
-
- UserControl
-
-
- HandleTopicControl.cs
-
-
- Component
-
-
- HeaderPanel.cs
-
-
- UserControl
-
-
- HandleQueueControl.cs
-
-
- Form
-
-
- ChangeQueueStatusForm.cs
-
-
- Form
-
-
- ConnectForm.cs
-
-
- Form
-
-
- ClipboardForm.cs
-
-
- Form
-
-
- ContainerForm.cs
-
-
- Form
-
-
- ChangeStatusForm.cs
-
-
- Form
-
-
- CollectionEditorForm.cs
-
-
- Form
-
-
- DateTimeRangeForm.cs
-
-
- Form
-
-
- EventDataForm.cs
-
-
- Form
-
-
- NewVersionAvailableForm.cs
-
-
- Form
-
-
- ParameterForm.cs
-
-
- Form
-
-
- RegistrationForm.cs
-
-
- Form
-
-
- UploadCertificateForm.cs
-
-
- Form
-
-
- MessageForm.cs
-
-
- Form
-
-
- ReceiveModeForm.cs
-
-
- Form
-
-
- DateTimeForm.cs
-
-
- Form
-
-
- FilterForm.cs
-
-
- Form
-
-
- RegistrationsForm.cs
-
-
- Form
-
-
- SelectEntityForm.cs
-
-
- Form
-
-
- TextForm.cs
-
-
- Form
-
-
- OptionForm.cs
-
-
- Form
-
-
- DeleteForm.cs
-
-
- Form
-
-
- AboutForm.cs
-
-
- True
- True
- ServiceBusExplorerResources.resx
-
-
- Form
-
-
- MainForm.cs
-
-
- AccidentalDeletionPreventionCheckControl.cs
-
-
- HandleConsumerGroupControl.cs
- Designer
-
-
- HandleEventHubControl.cs
- Designer
-
-
- HandlePartitionControl.cs
-
-
- HandleRelayControl.cs
- Designer
-
-
- PartitionListenerControl.cs
- Designer
-
-
- ListenerControl.cs
-
-
- HandleNotificationHubControl.cs
-
-
- Grouper.cs
- Designer
-
-
- TestEventHubControl.cs
-
-
- TimeSpanControl.cs
-
-
- Designer
-
-
- StandardValueEditorUI.cs
-
-
- TestRelayControl.cs
-
-
- TestSubscriptionControl.cs
-
-
- TestQueueControl.cs
-
-
- TestTopicControl.cs
- Designer
-
-
- HandleRuleControl.cs
-
-
- HandleSubscriptionControl.cs
-
-
- HandleTopicControl.cs
- Designer
-
-
- HeaderPanel.cs
-
-
- HandleQueueControl.cs
-
-
- AboutForm.cs
-
-
- ChangeQueueStatusForm.cs
-
-
- ClipboardForm.cs
-
-
- ContainerForm.cs
-
-
- ChangeStatusForm.cs
-
-
- CollectionEditorForm.cs
-
-
- DateTimeRangeForm.cs
-
-
- EventDataForm.cs
-
-
- NewVersionAvailableForm.cs
-
-
- ParameterForm.cs
-
-
- RegistrationForm.cs
-
-
- UploadCertificateForm.cs
-
-
- MessageForm.cs
-
-
- ReceiveModeForm.cs
-
-
- DateTimeForm.cs
-
-
- FilterForm.cs
-
-
- RegistrationsForm.cs
-
-
- SelectEntityForm.cs
-
-
- TextForm.cs
-
-
- OptionForm.cs
-
-
- DeleteForm.cs
-
-
- MainForm.cs
- Designer
-
-
- ConnectForm.cs
-
-
- PublicResXFileCodeGenerator
- Designer
- Resources.Designer.cs
-
-
- True
-
-
-
- PublicSettingsSingleFileGenerator
- Settings.Designer.cs
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
- True
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ true
+ 8.0.30703
+ {32754F39-E353-4607-94FE-B9B9ACFD58EF}
+ WinExe
+ net472
+ true
+ 1.0.0.1
+ publish\
+ true
+ Disk
+ false
+ Foreground
+ 7
+ Days
+ false
+ false
+ true
+ 0
+ 1.0.0.%2a
+ false
+ false
+ true
+ true
+ 8
+ Service Bus Explorer
+ Paolo Salvatori
+ Service Bus Explorer
+ The Service Bus Explorer allows users to connect to a Service Bus namespace and administer messaging entities in an easy manner. The tool provides advanced features like import/export functionality or the ability to test topic, queues, subscriptions, relay services, notification hubs and events hubs.
+ Copyright 2017 Paolo Salvatori
+ bin\$(Configuration)\
+ false
+ false
+ Paolo Salvatori
+
+ servicebusexplorer
+
+ https://github.com/paolosalvatori/ServiceBusExplorer
+ https://github.com/paolosalvatori/ServiceBusExplorer/releases
+ servicebusexplorer azure azureservicebus servicebus explorer eventhub queue subscription relay notificationhub
+
+
+ AnyCPU
+ full
+ true
+
+
+ AnyCPU
+ pdbonly
+
+
+ NewServiceBusExplorerLogo.ico
+
+
+
+
+
+ full
+ MinimumRecommendedRules.ruleset
+
+
+ pdbonly
+ MinimumRecommendedRules.ruleset
+
+
+ true
+ false
+ NewServiceBusExplorerLogo.jpg
+ https://github.com/paolosalvatori/ServiceBusExplorer
+ LICENSE.txt
+ app.manifest
+
+
+
+ Libraries\FastColoredTextBox.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ UserControl
+
+
+ AccidentalDeletionPreventionCheckControl.cs
+
+
+ Component
+
+
+ UserControl
+
+
+ HandleConsumerGroupControl.cs
+
+
+ UserControl
+
+
+ HandleEventHubControl.cs
+
+
+ UserControl
+
+
+ HandlePartitionControl.cs
+
+
+ UserControl
+
+
+ HandleRelayControl.cs
+
+
+ UserControl
+
+
+ PartitionListenerControl.cs
+
+
+ UserControl
+
+
+ ListenerControl.cs
+
+
+ UserControl
+
+
+ HandleNotificationHubControl.cs
+
+
+ UserControl
+
+
+ Component
+
+
+ Component
+
+
+ Component
+
+
+ Component
+
+
+ UserControl
+
+
+ TestEventHubControl.cs
+
+
+ UserControl
+
+
+ TimeSpanControl.cs
+
+
+ Component
+
+
+ UserControl
+
+
+ StandardValueEditorUI.cs
+
+
+
+ TestRelayControl.cs
+
+
+ UserControl
+
+
+ TestSubscriptionControl.cs
+
+
+
+ TestQueueControl.cs
+
+
+ UserControl
+
+
+ TestTopicControl.cs
+
+
+ UserControl
+
+
+ HandleRuleControl.cs
+
+
+ UserControl
+
+
+ HandleSubscriptionControl.cs
+
+
+ UserControl
+
+
+ HandleTopicControl.cs
+
+
+ Component
+
+
+ HeaderPanel.cs
+
+
+ UserControl
+
+
+ HandleQueueControl.cs
+
+
+ Form
+
+
+ ChangeQueueStatusForm.cs
+
+
+ Form
+
+
+ ConnectForm.cs
+
+
+ Form
+
+
+ ClipboardForm.cs
+
+
+ Form
+
+
+ ContainerForm.cs
+
+
+ Form
+
+
+ ChangeStatusForm.cs
+
+
+ Form
+
+
+ CollectionEditorForm.cs
+
+
+ Form
+
+
+ DateTimeRangeForm.cs
+
+
+ Form
+
+
+ EventDataForm.cs
+
+
+ Form
+
+
+ NewVersionAvailableForm.cs
+
+
+ Form
+
+
+ ParameterForm.cs
+
+
+ Form
+
+
+ RegistrationForm.cs
+
+
+ Form
+
+
+ UploadCertificateForm.cs
+
+
+ Form
+
+
+ MessageForm.cs
+
+
+ Form
+
+
+ ReceiveModeForm.cs
+
+
+ Form
+
+
+ DateTimeForm.cs
+
+
+ Form
+
+
+ FilterForm.cs
+
+
+ Form
+
+
+ RegistrationsForm.cs
+
+
+ Form
+
+
+ SelectEntityForm.cs
+
+
+ Form
+
+
+ TextForm.cs
+
+
+ Form
+
+
+ OptionForm.cs
+
+
+ Form
+
+
+ DeleteForm.cs
+
+
+ Form
+
+
+ AboutForm.cs
+
+
+ True
+ True
+ ServiceBusExplorerResources.resx
+
+
+ Form
+
+
+ MainForm.cs
+
+
+ AccidentalDeletionPreventionCheckControl.cs
+
+
+ HandleConsumerGroupControl.cs
+ Designer
+
+
+ HandleEventHubControl.cs
+ Designer
+
+
+ HandlePartitionControl.cs
+
+
+ HandleRelayControl.cs
+ Designer
+
+
+ PartitionListenerControl.cs
+ Designer
+
+
+ ListenerControl.cs
+
+
+ HandleNotificationHubControl.cs
+
+
+ Grouper.cs
+ Designer
+
+
+ TestEventHubControl.cs
+
+
+ TimeSpanControl.cs
+
+
+ Designer
+
+
+ StandardValueEditorUI.cs
+
+
+ TestRelayControl.cs
+
+
+ TestSubscriptionControl.cs
+
+
+ TestQueueControl.cs
+
+
+ TestTopicControl.cs
+ Designer
+
+
+ HandleRuleControl.cs
+
+
+ HandleSubscriptionControl.cs
+
+
+ HandleTopicControl.cs
+ Designer
+
+
+ HeaderPanel.cs
+
+
+ HandleQueueControl.cs
+
+
+ AboutForm.cs
+
+
+ ChangeQueueStatusForm.cs
+
+
+ ClipboardForm.cs
+
+
+ ContainerForm.cs
+
+
+ ChangeStatusForm.cs
+
+
+ CollectionEditorForm.cs
+
+
+ DateTimeRangeForm.cs
+
+
+ EventDataForm.cs
+
+
+ NewVersionAvailableForm.cs
+
+
+ ParameterForm.cs
+
+
+ RegistrationForm.cs
+
+
+ UploadCertificateForm.cs
+
+
+ MessageForm.cs
+
+
+ ReceiveModeForm.cs
+
+
+ DateTimeForm.cs
+
+
+ FilterForm.cs
+
+
+ RegistrationsForm.cs
+
+
+ SelectEntityForm.cs
+
+
+ TextForm.cs
+
+
+ OptionForm.cs
+
+
+ DeleteForm.cs
+
+
+ MainForm.cs
+ Designer
+
+
+ ConnectForm.cs
+
+
+ PublicResXFileCodeGenerator
+ Designer
+ Resources.Designer.cs
+
+
+ True
+
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+ True
+ True
+ Resources.resx
+
+
+ True
+ Settings.settings
+ True
+
+
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Utilities/Utilities.csproj b/src/Utilities/Utilities.csproj
index 335a7164..2cc9f08a 100644
--- a/src/Utilities/Utilities.csproj
+++ b/src/Utilities/Utilities.csproj
@@ -1,19 +1,13 @@
-
-
- netstandard2.0
- ServiceBusExplorer.Utilities
- 7.3
- ServiceBusExplorer.Utilities
- ServiceBusExplorer.Utilities
-
-
-
-
-
-
-
-
-
-
+
+ netstandard2.0
+ ServiceBusExplorer.Utilities
+ 7.3
+ ServiceBusExplorer.Utilities
+ 1.0.0.1
+ ServiceBusExplorer.Utilities
+
+
+
+