-
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Removed Autofixture * Use MongoDB 8 image * Use ESDB 24.6 for MongoDB tests
- Loading branch information
1 parent
24b401a
commit 4bd1e88
Showing
79 changed files
with
345 additions
and
328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 9 additions & 10 deletions
19
src/Core/test/Eventuous.Tests.Persistence.Base/Fixtures/DomainFixture.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
using AutoFixture; | ||
using Bogus; | ||
using Eventuous.Sut.App; | ||
using NodaTime; | ||
|
||
namespace Eventuous.Tests.Persistence.Base.Fixtures; | ||
|
||
public static class DomainFixture { | ||
static DomainFixture() => TypeMap.RegisterKnownEventTypes(typeof(DomainFixture).Assembly); | ||
|
||
static Faker<Commands.ImportBooking> Faker => new Faker<Commands.ImportBooking>() | ||
.RuleFor(x => x.BookingId, _ => Guid.NewGuid().ToString("N")) | ||
.RuleFor(x => x.RoomId, _ => Guid.NewGuid().ToString("N")) | ||
.RuleFor(x => x.Price, f => f.Random.Number(50, 200)) | ||
.RuleFor(x => x.CheckIn, f => f.Noda().LocalDate.Soon()) | ||
.RuleFor(x => x.CheckOut, (f, c) => c.CheckIn.PlusDays(f.Random.Number(1, 5))); | ||
|
||
public static Commands.ImportBooking CreateImportBooking(IFixture auto) { | ||
var from = auto.Create<LocalDate>(); | ||
|
||
return auto.Build<Commands.ImportBooking>() | ||
.With(x => x.CheckIn, from) | ||
.With(x => x.CheckOut, from.PlusDays(2)) | ||
.Create(); | ||
} | ||
public static Commands.ImportBooking CreateImportBooking() => Faker.Generate(); | ||
} |
7 changes: 3 additions & 4 deletions
7
src/Core/test/Eventuous.Tests.Persistence.Base/Fixtures/Helpers.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.