mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 17:11:10 +00:00
Refactors the test fixtures and their consumers to compose other fixtures instead of instantiating models inline
This commit is contained in:
1 parent
0abda472c6
commit
3aadd6de84
157 files changed
+1312
-597
No files matched your search
+4
-1
@@ -1,4 +1,5 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Contracts.Fixtures.Core.Requests.Authentication;
|
||||
using Lumina.Contracts.Requests.Authentication;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
#endregion
|
||||
@@ -11,11 +12,13 @@ namespace Lumina.Contracts.UnitTests.Requests.Authentication;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class RegistrationRequestTests
|
||||
{
|
||||
private readonly RegistrationRequestFixture _registrationRequestFixture = new();
|
||||
|
||||
[Fact]
|
||||
public void Constructor_WhenOmittingUse2fa_ShouldDefaultToTrue()
|
||||
{
|
||||
// Act
|
||||
RegistrationRequest sut = new(Username: "user1", Password: "pass1", PasswordConfirm: "pass1");
|
||||
RegistrationRequest sut = _registrationRequestFixture.Create(username: "user1", password: "pass1", passwordConfirm: "pass1", use2fa: true);
|
||||
|
||||
// Assert
|
||||
Assert.True(sut.Use2fa);
|
||||
|
||||
Reference in new issue
Block a user