mirror of
https://github.com/farcasclaudiu/PracticeCalendar.git
synced 2026-06-22 09:01:18 +03:00
@@ -1,7 +1,8 @@
|
||||
using FluentAssertions;
|
||||
using Moq;
|
||||
using PracticeCalendar.Application.PracticeEvents.Commands;
|
||||
using PracticeCalendar.Application.PracticeEvents.Queries;
|
||||
|
||||
using PracticeCalendar.Domain.Common;
|
||||
using static PracticeCalendar.UnitTests.Integration.Testing;
|
||||
|
||||
namespace PracticeCalendar.UnitTests.Integration.PracticeEvents
|
||||
@@ -38,6 +39,9 @@ namespace PracticeCalendar.UnitTests.Integration.PracticeEvents
|
||||
result.Should().NotBeNull();
|
||||
result.Id.Should().NotBe(0);
|
||||
result.Attendees.Count.Should().Be(2);
|
||||
|
||||
//check domain events count
|
||||
domainEventServiceMock.Verify(x=>x.Publish(It.IsAny<DomainEventBase>()), Times.Exactly(2));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,8 @@ namespace PracticeCalendar.UnitTests.Integration.PracticeEvents
|
||||
{
|
||||
await RunBeforeAnyTests();
|
||||
|
||||
await AddAsync(new PracticeEvent("Test Event", "Event description")
|
||||
await AddAsync(new PracticeEvent("Test Event", "Event description",
|
||||
DateTime.Now.AddHours(-1), DateTime.Now.AddHours(1))
|
||||
{
|
||||
Id = 1,
|
||||
Attendees = {
|
||||
|
||||
Reference in New Issue
Block a user