refactor(tests): migrate Database.Tests from FluentAssertions to Shouldly
Replace FluentAssertions with Shouldly across all 6 test files (94 tests). Add ShouldlyExtensions for BeCloseTo and BeEquivalentTo patterns.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
using Dapper;
|
||||
using FluentAssertions;
|
||||
using JdeScoping.Database.Tests.Infrastructure;
|
||||
using Shouldly;
|
||||
|
||||
namespace JdeScoping.Database.Tests.Procedures;
|
||||
|
||||
@@ -28,42 +28,42 @@ public class StoredProcedureExistsTests : DatabaseTestBase
|
||||
public async Task usp_SubmitSearch_Exists()
|
||||
{
|
||||
var exists = await ProcedureExistsAsync("usp_SubmitSearch");
|
||||
exists.Should().BeTrue("usp_SubmitSearch should be created by migration 040");
|
||||
exists.ShouldBeTrue("usp_SubmitSearch should be created by migration 040");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task usp_StartSearch_Exists()
|
||||
{
|
||||
var exists = await ProcedureExistsAsync("usp_StartSearch");
|
||||
exists.Should().BeTrue("usp_StartSearch should be created by migration 041");
|
||||
exists.ShouldBeTrue("usp_StartSearch should be created by migration 041");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task usp_CompleteSearch_Exists()
|
||||
{
|
||||
var exists = await ProcedureExistsAsync("usp_CompleteSearch");
|
||||
exists.Should().BeTrue("usp_CompleteSearch should be created by migration 042");
|
||||
exists.ShouldBeTrue("usp_CompleteSearch should be created by migration 042");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task usp_ResetPartialSearches_Exists()
|
||||
{
|
||||
var exists = await ProcedureExistsAsync("usp_ResetPartialSearches");
|
||||
exists.Should().BeTrue("usp_ResetPartialSearches should be created by migration 043");
|
||||
exists.ShouldBeTrue("usp_ResetPartialSearches should be created by migration 043");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task usp_ValidateSearchCriteria_Exists()
|
||||
{
|
||||
var exists = await ProcedureExistsAsync("usp_ValidateSearchCriteria");
|
||||
exists.Should().BeTrue("usp_ValidateSearchCriteria should be created by migration 048");
|
||||
exists.ShouldBeTrue("usp_ValidateSearchCriteria should be created by migration 048");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task usp_ProcessMisStagingData_Exists()
|
||||
{
|
||||
var exists = await ProcedureExistsAsync("usp_ProcessMisStagingData");
|
||||
exists.Should().BeTrue("usp_ProcessMisStagingData should be created by migration 049");
|
||||
exists.ShouldBeTrue("usp_ProcessMisStagingData should be created by migration 049");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -86,7 +86,7 @@ public class StoredProcedureExistsTests : DatabaseTestBase
|
||||
WHERE schema_id = SCHEMA_ID('dbo')
|
||||
AND name LIKE 'usp_%'");
|
||||
|
||||
actualCount.Should().BeGreaterThanOrEqualTo(
|
||||
actualCount.ShouldBeGreaterThanOrEqualTo(
|
||||
expectedProcedures.Length,
|
||||
$"Database should have at least {expectedProcedures.Length} stored procedures");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user