public override async System.Threading.Tasks.ValueTask <EventSourcingTests.Bugs.Bug_1679_use_inner_type_for_self_aggregate.InnerAggregate> BuildAsync(System.Collections.Generic.IReadOnlyList <Marten.Events.IEvent> events, Marten.IQuerySession session, EventSourcingTests.Bugs.Bug_1679_use_inner_type_for_self_aggregate.InnerAggregate snapshot, System.Threading.CancellationToken cancellation) { if (!events.Any()) { return(null); } EventSourcingTests.Bugs.Bug_1679_use_inner_type_for_self_aggregate.InnerAggregate innerAggregate = null; snapshot ??= Create(events[0], session); foreach (var @event in events) { snapshot = await Apply(@event, snapshot, session, cancellation); } return(snapshot); }
public override EventSourcingTests.Bugs.Bug_2025_event_inheritance_in_projection.Identity Build(System.Collections.Generic.IReadOnlyList <Marten.Events.IEvent> events, Marten.IQuerySession session, EventSourcingTests.Bugs.Bug_2025_event_inheritance_in_projection.Identity snapshot) { if (!events.Any()) { return(null); } EventSourcingTests.Bugs.Bug_2025_event_inheritance_in_projection.Identity identity = null; snapshot ??= Create(events[0], session); foreach (var @event in events) { snapshot = Apply(@event, snapshot, session); } return(snapshot); }
public override EventSourcingTests.Aggregation.RoomsAvailability Build(System.Collections.Generic.IReadOnlyList <Marten.Events.IEvent> events, Marten.IQuerySession session, EventSourcingTests.Aggregation.RoomsAvailability snapshot) { if (!events.Any()) { return(null); } EventSourcingTests.Aggregation.RoomsAvailability roomsAvailability = null; snapshot ??= Create(events[0], session); foreach (var @event in events) { snapshot = Apply(@event, snapshot, session); } return(snapshot); }
public async Task Delete_Language() { //Arrange System.Collections.Generic.IReadOnlyList <ApplicationLanguage> currentLanguages = await _languageManager.GetLanguagesAsync(AbpSession.TenantId); ApplicationLanguage randomLanguage = RandomHelper.GetRandomOf(currentLanguages.ToArray()); //Act await _languageAppService.DeleteLanguage(new EntityDto(randomLanguage.Id)); //Assert currentLanguages = await _languageManager.GetLanguagesAsync(AbpSession.TenantId); currentLanguages.Any(l => l.Name == randomLanguage.Name).ShouldBeFalse(); }