Skip to content

Commit 01bd93a

Browse files
fix: message doesn't match to the expectation at GetUserDetailHandlerTest
1 parent 796adc8 commit 01bd93a

7 files changed

Lines changed: 29 additions & 33 deletions

File tree

src/Api/packages.lock.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1287,7 +1287,6 @@
12871287
"Hangfire.Dashboard.Basic.Authentication": "[7.0.1, )",
12881288
"Hangfire.PostgreSql": "[1.20.10, )",
12891289
"MailKit": "[4.12.1, )",
1290-
"Npgsql.EntityFrameworkCore.PostgreSQL": "[8.0.11, )",
12911290
"Scrutor": "[6.1.0, )",
12921291
"Ulid": "[1.3.4, )"
12931292
}

src/Infrastructure/Infrastructure.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2020
<PrivateAssets>all</PrivateAssets>
2121
</PackageReference>
22-
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.11" />
2322
<PackageReference Include="Scrutor" Version="6.1.0" />
2423
<PackageReference Include="Ulid" Version="1.3.4" />
2524
</ItemGroup>

src/Infrastructure/packages.lock.json

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -94,18 +94,6 @@
9494
"Microsoft.EntityFrameworkCore.Design": "8.0.17"
9595
}
9696
},
97-
"Npgsql.EntityFrameworkCore.PostgreSQL": {
98-
"type": "Direct",
99-
"requested": "[8.0.11, )",
100-
"resolved": "8.0.11",
101-
"contentHash": "leShR/O/nSIS3Jpj8yUBmkzaXzBbtlV326+MYkX2BwAj2qSNrUv/H6m8G9Hnv2zUkQYccTpmV5jIVq5vdciEUA==",
102-
"dependencies": {
103-
"Microsoft.EntityFrameworkCore": "8.0.11",
104-
"Microsoft.EntityFrameworkCore.Abstractions": "8.0.11",
105-
"Microsoft.EntityFrameworkCore.Relational": "8.0.11",
106-
"Npgsql": "8.0.6"
107-
}
108-
},
10997
"Scrutor": {
11098
"type": "Direct",
11199
"requested": "[6.1.0, )",
@@ -820,6 +808,17 @@
820808
"Microsoft.Extensions.Logging.Abstractions": "8.0.0"
821809
}
822810
},
811+
"Npgsql.EntityFrameworkCore.PostgreSQL": {
812+
"type": "Transitive",
813+
"resolved": "8.0.11",
814+
"contentHash": "leShR/O/nSIS3Jpj8yUBmkzaXzBbtlV326+MYkX2BwAj2qSNrUv/H6m8G9Hnv2zUkQYccTpmV5jIVq5vdciEUA==",
815+
"dependencies": {
816+
"Microsoft.EntityFrameworkCore": "8.0.11",
817+
"Microsoft.EntityFrameworkCore.Abstractions": "8.0.11",
818+
"Microsoft.EntityFrameworkCore.Relational": "8.0.11",
819+
"Npgsql": "8.0.6"
820+
}
821+
},
823822
"NRedisStack": {
824823
"type": "Transitive",
825824
"resolved": "1.0.0",

tests/Application.SubcutaneousTests/Application.SubcutaneousTests.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.10" />
1717
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
1818
<PackageReference Include="Moq" Version="4.20.72" />
19-
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.11" />
2019
<PackageReference Include="Respawn" Version="6.2.1" />
2120
<PackageReference Include="Shouldly" Version="4.3.0" />
2221
<PackageReference Include="xunit" Version="2.5.3" />
@@ -25,10 +24,7 @@
2524

2625
<ItemGroup>
2726
<Using Include="Xunit" />
28-
<ProjectReference Include="..\..\src\Application\Application.csproj" />
2927
<ProjectReference Include="..\..\src\Api\Api.csproj" />
30-
<ProjectReference Include="..\..\src\Infrastructure\Infrastructure.csproj" />
31-
<ProjectReference Include="..\..\src\Contracts\Contracts.csproj" />
3228

3329
<None Include="..\..\src\Api\Resources\Translations\Message.en.resx">
3430
<Link>Resources\Translations\Message.en.resx</Link>

tests/Application.SubcutaneousTests/Users/Detail/GetUserDetailHandlerTest.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using Application.Common.Constants;
12
using Application.Features.Users.Queries.Detail;
23
using Application.SubcutaneousTests.Extensions;
34
using Domain.Aggregates.Users;
@@ -17,7 +18,12 @@ public async Task GetUser_WhenIdNotFound_ShouldReturnNotFoundResult()
1718
//act
1819
var result = await testingFixture.SendAsync(new GetUserDetailQuery(Id));
1920
//assert
20-
var expectedMessage = Messenger.Create<User>().Message(MessageType.Found).Negative().Build();
21+
var expectedMessage = Messenger
22+
.Create<User>()
23+
.Message(MessageType.Found)
24+
.Negative()
25+
.VietnameseTranslation(TranslatableMessage.VI_USER_NOT_FOUND)
26+
.Build();
2127
result.IsSuccess.ShouldBeFalse();
2228
result.Error.ShouldNotBeNull();
2329
result.Error?.ErrorMessage.ShouldBe(expectedMessage, new MessageResultComparer());

tests/Application.SubcutaneousTests/packages.lock.json

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,6 @@
4848
"Castle.Core": "5.1.1"
4949
}
5050
},
51-
"Npgsql.EntityFrameworkCore.PostgreSQL": {
52-
"type": "Direct",
53-
"requested": "[8.0.11, )",
54-
"resolved": "8.0.11",
55-
"contentHash": "leShR/O/nSIS3Jpj8yUBmkzaXzBbtlV326+MYkX2BwAj2qSNrUv/H6m8G9Hnv2zUkQYccTpmV5jIVq5vdciEUA==",
56-
"dependencies": {
57-
"Microsoft.EntityFrameworkCore": "8.0.11",
58-
"Microsoft.EntityFrameworkCore.Abstractions": "8.0.11",
59-
"Microsoft.EntityFrameworkCore.Relational": "8.0.11",
60-
"Npgsql": "8.0.6"
61-
}
62-
},
6351
"Respawn": {
6452
"type": "Direct",
6553
"requested": "[6.2.1, )",
@@ -1285,6 +1273,17 @@
12851273
"Npgsql": "8.0.6"
12861274
}
12871275
},
1276+
"Npgsql.EntityFrameworkCore.PostgreSQL": {
1277+
"type": "Transitive",
1278+
"resolved": "8.0.11",
1279+
"contentHash": "leShR/O/nSIS3Jpj8yUBmkzaXzBbtlV326+MYkX2BwAj2qSNrUv/H6m8G9Hnv2zUkQYccTpmV5jIVq5vdciEUA==",
1280+
"dependencies": {
1281+
"Microsoft.EntityFrameworkCore": "8.0.11",
1282+
"Microsoft.EntityFrameworkCore.Abstractions": "8.0.11",
1283+
"Microsoft.EntityFrameworkCore.Relational": "8.0.11",
1284+
"Npgsql": "8.0.6"
1285+
}
1286+
},
12881287
"NRedisStack": {
12891288
"type": "Transitive",
12901289
"resolved": "1.0.0",
@@ -2671,7 +2670,6 @@
26712670
"Hangfire.Dashboard.Basic.Authentication": "[7.0.1, )",
26722671
"Hangfire.PostgreSql": "[1.20.10, )",
26732672
"MailKit": "[4.12.1, )",
2674-
"Npgsql.EntityFrameworkCore.PostgreSQL": "[8.0.11, )",
26752673
"Scrutor": "[6.1.0, )",
26762674
"Ulid": "[1.3.4, )"
26772675
}

tests/Application.UnitTest/Application.UnitTest.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
<ItemGroup>
2323
<Using Include="Xunit" />
2424
<ProjectReference Include="..\..\src\Application\Application.csproj" />
25-
<ProjectReference Include="..\..\src\Contracts\Contracts.csproj" />
2625

2726
<None Include="..\..\src\Api\Resources\Translations\Message.en.resx">
2827
<Link>Resources\Translations\Message.en.resx</Link>

0 commit comments

Comments
 (0)