|
|
@ -49,18 +49,21 @@ namespace EventHub.Events |
|
|
[Fact] |
|
|
[Fact] |
|
|
public async Task Should_Update_The_Event_Capacity() |
|
|
public async Task Should_Update_The_Event_Capacity() |
|
|
{ |
|
|
{ |
|
|
|
|
|
const int newCapacity = 42; |
|
|
|
|
|
|
|
|
await WithUnitOfWorkAsync(async () => |
|
|
await WithUnitOfWorkAsync(async () => |
|
|
{ |
|
|
{ |
|
|
var @event = await _eventRepository.GetAsync(_testData.AbpMicroservicesFutureEventId); |
|
|
var @event = await _eventRepository.GetAsync( |
|
|
var newCapacity = @event.Capacity.HasValue ? @event.Capacity.Value + 1 : 42; |
|
|
_testData.AbpMicroservicesFutureEventId); |
|
|
|
|
|
|
|
|
await _eventManager.SetCapacityAsync( |
|
|
await _eventManager.SetCapacityAsync( |
|
|
@event, |
|
|
@event, |
|
|
newCapacity |
|
|
newCapacity |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
@event.Capacity.ShouldBe(newCapacity); |
|
|
|
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
var @event = await _eventRepository.GetAsync( |
|
|
|
|
|
_testData.AbpMicroservicesFutureEventId); |
|
|
|
|
|
@event.Capacity.ShouldBe(newCapacity); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
[Fact] |
|
|
[Fact] |
|
|
|