Use file scoped namepace

This commit is contained in:
2022-12-22 15:29:53 +01:00
parent 27bf5f0b24
commit 6d7e447ccc
51 changed files with 886 additions and 937 deletions

View File

@@ -4,48 +4,47 @@ using GerstITS.Examples.WebClients.Examples.Api;
using GerstITS.IoC.DotNetCore;
using GerstITS.Web.WebClients;
namespace GerstITS.Examples.WebClient.Console.Tests
namespace GerstITS.Examples.WebClient.Console.Tests;
internal sealed class TestRunner : IApplicationStart
{
internal sealed class TestRunner : IApplicationStart
#region Fields
private readonly IWebClient _webClient;
#endregion
#region Construtors
public TestRunner(IWebClient webClient)
{
#region Fields
private readonly IWebClient _webClient;
#endregion
#region Construtors
public TestRunner(IWebClient webClient)
{
_webClient = webClient;
}
_webClient = webClient;
}
#endregion
#endregion
#region ITestRunner
#region ITestRunner
public void Run()
{
var result1 = _webClient.Request<ICountry>()
.Execute(c => c.Search(new SearchCriteria
{ SortBy = nameof(Country.Name), SortDirection = SortingDirections.Descending, Skip = 5, Take = 5}));
public void Run()
{
var result1 = _webClient.Request<ICountry>()
.Execute(c => c.Search(new SearchCriteria
{ SortBy = nameof(Country.Name), SortDirection = SortingDirections.Descending, Skip = 5, Take = 5}));
var result2 = _webClient.Request<ICountry>()
.Execute(c => c.Get(result1.Value.Result.First().Id));
var result2 = _webClient.Request<ICountry>()
.Execute(c => c.Get(result1.Value.Result.First().Id));
var test3 = _webClient.Request<ICountry>()
.Execute(c => c.Create(new Country {Name = $"Country-{Guid.NewGuid()}"}));
var test3 = _webClient.Request<ICountry>()
.Execute(c => c.Create(new Country {Name = $"Country-{Guid.NewGuid()}"}));
test3.Value.Name += "_Renamed";
test3.Value.Name += "_Renamed";
var test4 = _webClient.Request<ICountry>()
.Execute(c => c.Update(test3.Value));
var test4 = _webClient.Request<ICountry>()
.Execute(c => c.Update(test3.Value));
var test5 = _webClient.Request<ICountry>()
.Execute(c => c.Delete(test3.Value.Id));
}
var test5 = _webClient.Request<ICountry>()
.Execute(c => c.Delete(test3.Value.Id));
}
#endregion
}
#endregion
}