Use file scoped namepace
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user