diff --git a/Fonlow.Testing.HttpCore/BasicHttpClient.cs b/Fonlow.Testing.HttpCore/BasicHttpClient.cs index 110bb2b..350a654 100644 --- a/Fonlow.Testing.HttpCore/BasicHttpClient.cs +++ b/Fonlow.Testing.HttpCore/BasicHttpClient.cs @@ -30,7 +30,6 @@ static HttpClientHandler AcceptAnyCertificateHandler public System.Net.Http.HttpClient HttpClient { get; private set; } - public Uri BaseUri { get; protected set; } #region IDisposable pattern bool disposed; diff --git a/Fonlow.Testing.HttpCore/Fonlow.Testing.HttpCore.csproj b/Fonlow.Testing.HttpCore/Fonlow.Testing.HttpCore.csproj index bef4eee..1e81716 100644 --- a/Fonlow.Testing.HttpCore/Fonlow.Testing.HttpCore.csproj +++ b/Fonlow.Testing.HttpCore/Fonlow.Testing.HttpCore.csproj @@ -10,7 +10,7 @@ https://github.com/zijianhuang/FonlowTesting xunit nunit mstest unittesting iisexpress iis webapi restful dotnet en - 3.4 + 3.4.1 Upgraded to .NET 8. README.md latest-all diff --git a/Fonlow.Testing.HttpCore/TestingSettings.cs b/Fonlow.Testing.HttpCore/TestingSettings.cs index b606773..95a04f6 100644 --- a/Fonlow.Testing.HttpCore/TestingSettings.cs +++ b/Fonlow.Testing.HttpCore/TestingSettings.cs @@ -86,7 +86,10 @@ static string GetBuildConfiguration() [Obsolete("In favor of ServiceCommandFixture")] public string DotNetServiceAssemblyPath { get; set; } - [Obsolete("In favor of ServiceCommandFixture")] + + /// + /// Used when Web resource is there, no need to be under the control of the test suite. + /// public string BaseUrl { get; set; } public string Username { get; set; } @@ -124,7 +127,7 @@ static string GetBuildConfiguration() public ServiceCommand[] ServiceCommands { get; set; } /// - /// Build configuration such as Debug, Release or whatever custom build configuration. + /// Build configuration of the test suite such as Debug, Release or whatever custom build configuration. /// ServiceCommandFixture will replace {BuildConfiguration} in commandPath and arguments with this. /// public string BuildConfiguration { get; private set; } diff --git a/Fonlow.Testing.ServiceCore/Fonlow.Testing.ServiceCore.csproj b/Fonlow.Testing.ServiceCore/Fonlow.Testing.ServiceCore.csproj index ae6abd8..e89b4e4 100644 --- a/Fonlow.Testing.ServiceCore/Fonlow.Testing.ServiceCore.csproj +++ b/Fonlow.Testing.ServiceCore/Fonlow.Testing.ServiceCore.csproj @@ -11,7 +11,7 @@ xunit nunit mstest unittesting iisexpress iis dotnet en true - 3.6 + 3.6.1 README.md latest-all diff --git a/Fonlow.Testing.ServiceCore/ServiceCommandsFixture.cs b/Fonlow.Testing.ServiceCore/ServiceCommandsFixture.cs index f7e002d..627b70a 100644 --- a/Fonlow.Testing.ServiceCore/ServiceCommandsFixture.cs +++ b/Fonlow.Testing.ServiceCore/ServiceCommandsFixture.cs @@ -1,57 +1,57 @@ -using System; -using System.Collections.Generic; - -namespace Fonlow.Testing -{ - /// - /// Launch services defined in TestingSettings - /// - public class ServiceCommandsFixture : IDisposable - { - /// - /// Create the fixture. And this constructor is also used in XUnit.ICollectionFixture. - /// - public ServiceCommandsFixture() - { - foreach (var item in TestingSettings.Instance.ServiceCommands) - { - item.Arguments = item.Arguments?.Replace("{BuildConfiguration}", TestingSettings.Instance.BuildConfiguration); +using System; +using System.Collections.Generic; + +namespace Fonlow.Testing +{ + /// + /// Launch services defined in TestingSettings + /// + public class ServiceCommandsFixture : IDisposable + { + /// + /// Create the fixture. And this constructor is also used in XUnit.ICollectionFixture. + /// + public ServiceCommandsFixture() + { + foreach (var item in TestingSettings.Instance.ServiceCommands) + { + item.Arguments = item.Arguments?.Replace("{BuildConfiguration}", TestingSettings.Instance.BuildConfiguration); item.CommandPath = item.CommandPath?.Replace("{BuildConfiguration}", TestingSettings.Instance.BuildConfiguration); - var serviceCommandAgent = new ServiceCommandAgent(item); - serviceCommandAgent.Start(); - serviceCommandAgents.Add(serviceCommandAgent); - } - } - - List serviceCommandAgents = new List(); - - bool disposed; - - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) - { - if (!disposed) - { - if (disposing) - { - foreach (var agent in serviceCommandAgents) - { - if (agent != null) - { - agent.Stop(); - } - } - } - - disposed = true; - } - } - - } - + var serviceCommandAgent = new ServiceCommandAgent(item); + serviceCommandAgent.Start(); + serviceCommandAgents.Add(serviceCommandAgent); + } + } + + List serviceCommandAgents = new List(); + + bool disposed; + + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) + { + if (!disposed) + { + if (disposing) + { + foreach (var agent in serviceCommandAgents) + { + if (agent != null) + { + agent.Stop(); + } + } + } + + disposed = true; + } + } + + } + } \ No newline at end of file