diff --git a/src/CSharp/EasyMicroservices.Cores.AspCore.Tests/BasicTests.cs b/src/CSharp/EasyMicroservices.Cores.AspCore.Tests/BasicTests.cs index 034fb92..204c686 100644 --- a/src/CSharp/EasyMicroservices.Cores.AspCore.Tests/BasicTests.cs +++ b/src/CSharp/EasyMicroservices.Cores.AspCore.Tests/BasicTests.cs @@ -1,5 +1,6 @@ using EasyMicroservices.Cores.Database.Managers; using EasyMicroservices.Cores.Tests.Contracts.Common; +using EasyMicroservices.Cores.Tests.DatabaseLogics.Database.Entities; using EasyMicroservices.ServiceContracts; using Newtonsoft.Json; @@ -31,6 +32,15 @@ public async Task Get_EndpointsReturnSuccessAndCorrectContentType() return data; } + [Fact] + public async Task> Filter() + { + var data = await HttpClient.PostAsJsonAsync($"{GetBaseUrl()}/api/user/filter", new object()); + var result = JsonConvert.DeserializeObject>(await data.Content.ReadAsStringAsync()); + AssertTrue(result); + return result; + } + [Fact] public async Task AuthorizeTest() { @@ -87,6 +97,30 @@ public async Task AddUser() JsonConvert.SerializeObject(users.Result)); } + [Fact] + public async Task AddUserEmptyUniqueIdentity() + { + var userName = "EmptyUID"; + var data = await HttpClient.PostAsJsonAsync($"{GetBaseUrl()}/api/user/Add", new UpdateUserContract() + { + UserName = userName + }); + var jsondata = await data.Content.ReadAsStringAsync(); + var result = JsonConvert.DeserializeObject(jsondata); + AssertTrue(result); + var getAllRespone = await Get_EndpointsReturnSuccessAndCorrectContentType(); + var users = JsonConvert.DeserializeObject>(getAllRespone); + AssertTrue(users); + if (users.IsSuccess) + Assert.True(users.Result.Any(x => x.UserName == userName), + JsonConvert.SerializeObject(users.Result)); + users = await Filter(); + AssertTrue(users); + if (users.IsSuccess) + Assert.True(users.Result.Any(x => x.UserName == userName), + JsonConvert.SerializeObject(users.Result)); + } + protected virtual void AuthorizeAssert(MessageContract messageContract) { Assert.True(messageContract.Error.FailedReasonType == FailedReasonType.SessionAccessDenied); diff --git a/src/CSharp/EasyMicroservices.Cores.AspCoreApi/EasyMicroservices.Cores.AspCoreApi.csproj b/src/CSharp/EasyMicroservices.Cores.AspCoreApi/EasyMicroservices.Cores.AspCoreApi.csproj index 0eb3e0f..9a28b4c 100644 --- a/src/CSharp/EasyMicroservices.Cores.AspCoreApi/EasyMicroservices.Cores.AspCoreApi.csproj +++ b/src/CSharp/EasyMicroservices.Cores.AspCoreApi/EasyMicroservices.Cores.AspCoreApi.csproj @@ -4,7 +4,7 @@ net6.0;net7.0;net8.0 AnyCPU;x64;x86 EasyMicroservices - 0.0.0.99 + 0.0.1.0 asp core servces. EasyMicroservices@gmail.com core,cores,base,database,services,asp,aspnet diff --git a/src/CSharp/EasyMicroservices.Cores.AspEntityFrameworkCoreApi/EasyMicroservices.Cores.AspEntityFrameworkCoreApi.csproj b/src/CSharp/EasyMicroservices.Cores.AspEntityFrameworkCoreApi/EasyMicroservices.Cores.AspEntityFrameworkCoreApi.csproj index 77ba6e0..20b6730 100644 --- a/src/CSharp/EasyMicroservices.Cores.AspEntityFrameworkCoreApi/EasyMicroservices.Cores.AspEntityFrameworkCoreApi.csproj +++ b/src/CSharp/EasyMicroservices.Cores.AspEntityFrameworkCoreApi/EasyMicroservices.Cores.AspEntityFrameworkCoreApi.csproj @@ -4,7 +4,7 @@ net6.0;net7.0;net8.0 AnyCPU;x64;x86 EasyMicroservices - 0.0.0.99 + 0.0.1.0 asp core servces. EasyMicroservices@gmail.com core,cores,base,database,services,asp,aspnet,aspcore,efcore diff --git a/src/CSharp/EasyMicroservices.Cores.AspEntityFrameworkCoreApi/StartUpExtensions.cs b/src/CSharp/EasyMicroservices.Cores.AspEntityFrameworkCoreApi/StartUpExtensions.cs index 8cd5753..f4a4b36 100644 --- a/src/CSharp/EasyMicroservices.Cores.AspEntityFrameworkCoreApi/StartUpExtensions.cs +++ b/src/CSharp/EasyMicroservices.Cores.AspEntityFrameworkCoreApi/StartUpExtensions.cs @@ -170,7 +170,7 @@ public static async Task Build(this IApplicationBuilder app) .Build(); app.UseDeveloperExceptionPage(); - var useSwagger = config["Authorization:IsUse"]; + var useSwagger = config["Swagger:IsUse"]; var doUseSwagger = useSwagger.HasValue() && useSwagger.Equals("true", StringComparison.OrdinalIgnoreCase); if (doUseSwagger) { diff --git a/src/CSharp/EasyMicroservices.Cores.Clients/EasyMicroservices.Cores.Clients.csproj b/src/CSharp/EasyMicroservices.Cores.Clients/EasyMicroservices.Cores.Clients.csproj index 8c6cc13..9de2ca5 100644 --- a/src/CSharp/EasyMicroservices.Cores.Clients/EasyMicroservices.Cores.Clients.csproj +++ b/src/CSharp/EasyMicroservices.Cores.Clients/EasyMicroservices.Cores.Clients.csproj @@ -4,7 +4,7 @@ netstandard2.0;netstandard2.1;net6.0;net8.0 AnyCPU;x64;x86 EasyMicroservices - 0.0.0.99 + 0.0.1.0 core of database. EasyMicroservices@gmail.com core,cores,base,client,clients diff --git a/src/CSharp/EasyMicroservices.Cores.Contracts/EasyMicroservices.Cores.Contracts.csproj b/src/CSharp/EasyMicroservices.Cores.Contracts/EasyMicroservices.Cores.Contracts.csproj index 4b6260c..00c2236 100644 --- a/src/CSharp/EasyMicroservices.Cores.Contracts/EasyMicroservices.Cores.Contracts.csproj +++ b/src/CSharp/EasyMicroservices.Cores.Contracts/EasyMicroservices.Cores.Contracts.csproj @@ -4,7 +4,7 @@ netstandard2.0;netstandard2.1;net45;net6.0;net8.0 AnyCPU;x64;x86 EasyMicroservices - 0.0.0.99 + 0.0.1.0 core contracts. EasyMicroservices@gmail.com core,cores,base,contract,contracts,dto,dtos diff --git a/src/CSharp/EasyMicroservices.Cores.Database/EasyMicroservices.Cores.Database.csproj b/src/CSharp/EasyMicroservices.Cores.Database/EasyMicroservices.Cores.Database.csproj index 3a1b414..4f37feb 100644 --- a/src/CSharp/EasyMicroservices.Cores.Database/EasyMicroservices.Cores.Database.csproj +++ b/src/CSharp/EasyMicroservices.Cores.Database/EasyMicroservices.Cores.Database.csproj @@ -4,7 +4,7 @@ netstandard2.0;netstandard2.1;net45;net6.0;net8.0 AnyCPU;x64;x86 EasyMicroservices - 0.0.0.99 + 0.0.1.0 core of database. EasyMicroservices@gmail.com core,cores,base,database diff --git a/src/CSharp/EasyMicroservices.Cores.EntityFrameworkCore/EasyMicroservices.Cores.EntityFrameworkCore.csproj b/src/CSharp/EasyMicroservices.Cores.EntityFrameworkCore/EasyMicroservices.Cores.EntityFrameworkCore.csproj index bfd5981..cf6afd2 100644 --- a/src/CSharp/EasyMicroservices.Cores.EntityFrameworkCore/EasyMicroservices.Cores.EntityFrameworkCore.csproj +++ b/src/CSharp/EasyMicroservices.Cores.EntityFrameworkCore/EasyMicroservices.Cores.EntityFrameworkCore.csproj @@ -4,7 +4,7 @@ net6.0;net8.0 AnyCPU;x64;x86 EasyMicroservices - 0.0.0.99 + 0.0.1.0 ef core of database. EasyMicroservices@gmail.com core,cores,base,database,ef,efcore diff --git a/src/CSharp/EasyMicroservices.Cores.Relational.EntityFrameworkCore/EasyMicroservices.Cores.Relational.EntityFrameworkCore.csproj b/src/CSharp/EasyMicroservices.Cores.Relational.EntityFrameworkCore/EasyMicroservices.Cores.Relational.EntityFrameworkCore.csproj index 9c8dc88..940894f 100644 --- a/src/CSharp/EasyMicroservices.Cores.Relational.EntityFrameworkCore/EasyMicroservices.Cores.Relational.EntityFrameworkCore.csproj +++ b/src/CSharp/EasyMicroservices.Cores.Relational.EntityFrameworkCore/EasyMicroservices.Cores.Relational.EntityFrameworkCore.csproj @@ -4,7 +4,7 @@ net6.0;net8.0 AnyCPU;x64;x86 EasyMicroservices - 0.0.0.99 + 0.0.1.0 ef core of Relational database. EasyMicroservices@gmail.com core,cores,base,database,ef,efcore,Relational