Skip to content

Move scope creation to before bus start #174

Move scope creation to before bus start

Move scope creation to before bus start #174

GitHub Actions / tests succeeded Jan 26, 2024 in 0s

tests ✅

Tests passed successfully

✅ artifacts/test-reports/Aggregates.NET.UnitTests/TestResults.trx

256 tests were completed in 6s with 256 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Aggregates.Common.ChildRepository 7✅ 68ms
Aggregates.Common.Entity 8✅ 631ms
Aggregates.Common.EntityFactory 3✅ 23ms
Aggregates.Common.Enumeration 13✅ 16ms
Aggregates.Common.EventSubscriber 4✅ 216ms
Aggregates.Common.Exceptions.BusinessException 6✅ 107ms
Aggregates.Common.Exceptions.GenericExceptions 5✅ 418ms
Aggregates.Common.Extensions.Context 2✅ 22ms
Aggregates.Common.Extensions.Exception 3✅ 5ms
Aggregates.Common.Extensions.MethodInfo 1✅ 26ms
Aggregates.Common.Extensions.Reflection 6✅ 11ms
Aggregates.Common.Extensions.Store 2✅ 6ms
Aggregates.Common.Extensions.String 6✅ 6ms
Aggregates.Common.HostedService 2✅ 7ms
Aggregates.Common.IdTests 12✅ 14ms
Aggregates.Common.Repository 14✅ 743ms
Aggregates.Common.Settings 12✅ 139ms
Aggregates.Common.State 3✅ 5ms
Aggregates.Common.StoreEntities 15✅ 250ms
Aggregates.Common.StoreSnapshots 2✅ 25ms
Aggregates.Common.TrackChildren 8✅ 97ms
Aggregates.Common.UnitOfWork 8✅ 57ms
Aggregates.Common.VersionRegistrar 11✅ 34ms
Aggregates.EventStore.EventStoreConsumer 4✅ 651ms
Aggregates.EventStore.StoreEvents 2✅ 27ms
Aggregates.NServiceBus.CommandAcceptor 5✅ 106ms
Aggregates.NServiceBus.FailureReply 5✅ 55ms
Aggregates.NServiceBus.MessageDetyper 6✅ 59ms
Aggregates.NServiceBus.MessageIdentifier 3✅ 30ms
Aggregates.NServiceBus.MutateIncoming 2✅ 39ms
Aggregates.NServiceBus.MutateOutgoing 2✅ 55ms
Aggregates.NServiceBus.NSBUnitOfWork 5✅ 48ms
Aggregates.NServiceBus.SagaBehavior 3✅ 16ms
Aggregates.Testing.TestableContext.EventChecker 16✅ 464ms
Aggregates.Testing.TestableContext.EventPlanner 21✅ 403ms
Aggregates.Testing.TestableContext.ModelChecker 21✅ 425ms
Aggregates.Testing.TestableContext.ServiceChecker 3✅ 10ms
Aggregates.Testing.TestableId 5✅ 5ms

✅ Aggregates.Common.ChildRepository

✅ ShouldGetEntityFromGet
✅ ShouldGetEntityFromTryGet
✅ ShouldGetExceptionFromGetUnknown
✅ ShouldGetExistingEntityAgain
✅ ShouldGetExistingEntityOnNew
✅ ShouldGetNewEntity
✅ ShouldNotGetEntityFromTryGet

✅ Aggregates.Common.Entity

✅ EntityHasBucket
✅ EntityHasId
✅ EntityShouldBeClean
✅ EntityShouldBeDirty
✅ EntityShouldBeNew
✅ NewEntityShouldBeDirty
✅ ShouldFailDefinedRule
✅ ShouldPassDefinedRule

✅ Aggregates.Common.EntityFactory

✅ ShouldCreateNewEntity
✅ ShouldRejectIncorrectSnapshot
✅ ShouldUseSnapshot

✅ Aggregates.Common.Enumeration

✅ ShouldBeEqual
✅ ShouldBeNotEqual
✅ ShouldCompareToBe0ForEqualInstances
✅ ShouldCompareToNullBeGreaterThanNull
✅ ShouldCompareToUsingValue
✅ ShouldHasDisplayName
✅ ShouldHasValue
✅ ShouldParseUsingDisplayName
✅ ShouldParseUsingFromValue
✅ ShouldSortList
✅ ShouldThrowArgumentExceptionWhenBadDisplayName
✅ ShouldThrowArgumentExceptionWhenBadValue
✅ ShouldToStringBeDisplayName

✅ Aggregates.Common.EventSubscriber

✅ ConnectToProjection
✅ DoesntConnectToProjection
✅ NoEventsDoesntCreateProjection
✅ SetupCreatesProjection

✅ Aggregates.Common.Exceptions.BusinessException

✅ ShouldBeDeserializable
✅ ShouldBeSerializable
✅ ShouldConstruct
✅ ShouldContainRuleAndMessage
✅ ShouldContainRuleFailure
✅ ShouldDeserialize

✅ Aggregates.Common.Exceptions.GenericExceptions

✅ ShouldHaveEntityBucketIdAndParentsInEntityAlreadyExistsException
✅ ShouldHaveMessageAndInnerExceptionInPersistenceException
✅ ShouldHaveMessageAndInnerExceptionInVersionException
✅ ShouldHaveProjectionNameExistingAndDesiredDefinition
✅ ShouldHaveStreamAndClient

✅ Aggregates.Common.Extensions.Context

✅ ShouldProcessService
✅ ShouldProcessServiceFromFactory

✅ Aggregates.Common.Extensions.Exception

✅ ShouldSerializeAggregateExceptionToString
✅ ShouldSerializeExceptionToString
✅ ShouldSerializeInnerExceptionToString

✅ Aggregates.Common.Extensions.MethodInfo

✅ ShouldCreateFunc

✅ Aggregates.Common.Extensions.Reflection

✅ ShouldCreateChildRepositoryFactory
✅ ShouldCreateRepositoryFactory
✅ ShouldGetHandleInfoFromState
✅ ShouldGetServiceHandler
✅ ShouldNotGetPublicConflictInfoFromState
✅ ShouldNotGetPublicHandleInfoFromState

✅ Aggregates.Common.Extensions.Store

✅ ShouldCompressAndDecompressBytes
✅ ShouldConvertStringToByte

✅ Aggregates.Common.Extensions.String

✅ ShouldGetAStringHash
✅ ShouldNotTrimNumberOfLines
✅ ShouldNotTrimNumberOfLinesOnMultilineString
✅ ShouldNotTrimShortString
✅ ShouldTrimLongString
✅ ShouldTrimNumberOfLines

✅ Aggregates.Common.HostedService

✅ CallsStart
✅ CallsStop

✅ Aggregates.Common.IdTests

✅ GuidIdShouldEqualGuid
✅ IdShouldNotEqualNull
✅ LongIdShouldEqualLong
✅ NullIdShouldEqualNull
✅ NullIdValueShouldEqualNull
✅ ShouldCreateIdFromGuid
✅ ShouldCreateIdFromLong
✅ ShouldCreateIdFromString
✅ ShouldGetStringWithNullValue
✅ StringIdShouldEqualString
✅ TwoIdenticalIdsShouldEqual
✅ TwoSameIdShouldBeEqual

✅ Aggregates.Common.Repository

✅ CommitShouldNotSaveUnchangedEntities
✅ CommitShouldSaveChangedEntities
✅ PrepareShoudNotVerifyVersionOnChangedEntities
✅ PrepareShouldVerifyVersionOnUnchangedEntities
✅ ShouldGetEntityFromGet
✅ ShouldGetEntityFromTryGet
✅ ShouldGetEntityFromTryGetWithNullId
✅ ShouldGetExceptionFromGetUnknown
✅ ShouldGetExistingEntityAgain
✅ ShouldGetExistingEntityOnNew
✅ ShouldGetNewEntity
✅ ShouldHaveChangedStreams
✅ ShouldHaveNoChangedStreams
✅ ShouldNotGetEntityFromTryGet

✅ Aggregates.Common.Settings

✅ GettingUnitOfWorkScopeException
✅ ProxyUowAppUnitOfWorks
✅ ShouldBuildDefaultConfiguration
✅ ShouldCallRegistrationTasks
✅ ShouldNotBeSetupAfterRegistrationException
✅ ShouldRequireContainerDefinition
✅ ShouldSetOptions
✅ ShouldUseMetrics
✅ ThrowsWhenDoesntImplementBaseUnitOfWork
✅ ThrowsWhenNoUnitOfWork
✅ UseApplicationUow
✅ UseDomainUow

✅ Aggregates.Common.State

✅ ShouldRejectInvalidSnapshot
✅ ShouldRestoreFromEvents
✅ ShouldRestoreFromSnapshot

✅ Aggregates.Common.StoreEntities

✅ ShouldCommitDomainEvents
✅ ShouldCommitSnapshot
✅ ShouldCreateChildEntity
✅ ShouldCreateNewEntity
✅ ShouldGetChildEntity
✅ ShouldGetEntityNoSnapshot
✅ ShouldGetEntityWithSnapshot
✅ ShouldGetEventStreamFromSnapshotVersionOn
✅ ShouldNotCommitCleanEntity
✅ ShouldNotThrowOnSnapshotFailure
✅ ShouldNotVerifyDirtyEntity
✅ ShouldNotVerifyNewEntity
✅ ShouldThrowEntityAlreadyExistsException
✅ ShouldThrowPersistenceException
✅ ShouldVerifyVersion

✅ Aggregates.Common.StoreSnapshots

✅ ShouldGetSnapshotFromEventStore
✅ ShouldWriteSnapshot

✅ Aggregates.Common.TrackChildren

✅ CallingSetupNotEnabledDoesNotCreateProjection
✅ GetChildrenHasChildrenDifferentType
✅ GetChildrenHasChildrenNull
✅ GetChildrenReturnsNull
✅ GetChildrenWithChildren
✅ NotEnabledThrows
✅ NotSetupThrows
✅ SetupCallsProjectionCreation

✅ Aggregates.Common.UnitOfWork

✅ ShouldCommitOnEnd
✅ ShouldCreateRepository
✅ ShouldCreateSameRepository
✅ ShouldDisposeAllRepositories
✅ ShouldNotCommitIfNoCommitId
✅ ShouldNotCommitOnEndWithException
✅ ShouldNotCommitWhenProcessingAnEvent
✅ ShouldPrepareAllRepositoriesWhenMultipleChangedStreams

✅ Aggregates.Common.VersionRegistrar

✅ DuplicateTypesThrow
✅ GetNamedTypeWrongFormat
✅ GetNonesitantType
✅ GetNonLoadedType
✅ GetTypeNoVersion
✅ GetTypeOldVersion
✅ GetTypeWrongVersion
✅ LoadTwiceTypeIsFine
✅ LoadTypeIsLoaded
✅ NonVersionedWorks
✅ TwiceLoadedIsFine

✅ Aggregates.EventStore.EventStoreConsumer

✅ SetupChildrenProjection
✅ SetupProjectionAllEvents
✅ SetupProjectionNoEvents
✅ SetupProjectionWithEvents

✅ Aggregates.EventStore.StoreEvents

✅ SnapshotReadsLast
✅ SnapshotStreamDoesntExist

✅ Aggregates.NServiceBus.CommandAcceptor

✅ ShouldNotAcceptIfNoResponseRequested
✅ ShouldProcessEvent
✅ ShouldRejectCommand
✅ ShouldReplyToCommand
✅ ShouldStillRejectifNoResponseRequested

✅ Aggregates.NServiceBus.FailureReply

✅ MessageFailed
✅ MessageFailedAlreadyHandled
✅ MessageFailedNoReplyRequested
✅ MessageFailedWasNotSend
✅ ShouldProcessMessage

✅ Aggregates.NServiceBus.MessageDetyper

✅ FailToGetMessageType
✅ InvalidMultipleMessageType
✅ MultipleMessageTypesHandled
✅ NoEnclosedMessageType
✅ NoVersionedName
✅ ReplacedMessageTypeWithVersioned

✅ Aggregates.NServiceBus.MessageIdentifier

✅ NoEnclosedMessageType
✅ NoMappedType
✅ TranslateEnclosedType

✅ Aggregates.NServiceBus.MutateIncoming

✅ ShouldMutateMessage
✅ ShouldNotMutateReplies

✅ Aggregates.NServiceBus.MutateOutgoing

✅ ShouldMutateMessage
✅ ShouldNotMutateReplies

✅ Aggregates.NServiceBus.NSBUnitOfWork

✅ ShouldAddWorkingHeadersToOutgoing
✅ ShouldGetCommitIdFromMessageId
✅ ShouldGetCommitIdFromNServiceBusMessageId
✅ ShouldPopulateCurrentMessageAndHeaders
✅ ShouldWriteOutgoingHeaders

✅ Aggregates.NServiceBus.SagaBehavior

✅ AcceptReplaced
✅ NoSagaHeader
✅ RejectReplaced

✅ Aggregates.Testing.TestableContext.EventChecker

✅ ChildRaisedEventNotRaisedInParent
✅ DidntRaisedEventType
✅ EntityIsChanged
✅ EntityRaisedEvent
✅ EntityRemainsUnchanged
✅ EntityWithEventsRemainsUnchanged
✅ HasEventsDoesntCountAsRaised
✅ MultipleRaisedEventsDifferentContent
✅ ParentRemainsUnchangedWhenChildIs
✅ RaisedEventType
✅ RaisedEventWithAssert
✅ RaisedEventWithAssertFails
✅ RaisesDifferentTypeButSameData
✅ RaisesSpecificEvent
✅ RaisesSpecificEventInChildTestableId
✅ RaisesSpecificEventTestableId

✅ Aggregates.Testing.TestableContext.EventPlanner

✅ DoesntRaiseEvent
✅ EntityDoesntExists
✅ EntityExists
✅ EntityHasEvents
✅ EntityHasMultipleEvents
✅ EntityHasNoSnapshot
✅ EntityHasSnapshot
✅ EntityWithAChild
✅ EntityWithAChildDoesntRaiseEvent
✅ EntityWithAChildEntityDoesntExists
✅ EntityWithAChildEntityExists
✅ EntityWithAChildEntityHasEvents
✅ EntityWithAChildEntityHasMultipleEvents
✅ EntityWithAChildEntityHasNoSnapshot
✅ EntityWithAChildEntityHasSnapshot
✅ EntityWithAChildNewEntityShouldBeVersionNegOne
✅ NewEntityShouldBeVersionNegOne
✅ RaisedContainsContent
✅ RaisedContainsContentForChild
✅ RaisesEvent
✅ RaisesEventUsingTestableId

✅ Aggregates.Testing.TestableContext.ModelChecker

✅ CreateModel
✅ CreateModelCheckContent
✅ CreateModelCheckContentFails
✅ CreateModelCheckExactObject
✅ CreateModelCheckExactObjectFails
✅ CreateModelWrongId
✅ DeleteModel
✅ DeleteModelThatDoesntExistIsOk
✅ DeleteModelWrongId
✅ ReadModel
✅ ReadModelDoesntExist
✅ ReadModelWrongId
✅ UpdateModel
✅ UpdateModelCheckWrongId
✅ UpdateModelDoesntExist
✅ UpdateModelIsUpdated
✅ UpdateModelIsUpdatedFailAssert
✅ UpdateModelIsUpdatedFailAssertWrongId
✅ UpdateModelIsUpdatedWrongCheck
✅ UpdateModelIsUpdatedWrongId
✅ UpdateModelWrongId

✅ Aggregates.Testing.TestableContext.ServiceChecker

✅ CallService
✅ CallServiceNotPlanned
✅ WasntRequested

✅ Aggregates.Testing.TestableId

✅ TwoAnyIdEqual
✅ TwoIntKeysDifferent
✅ TwoSameIntSameId
✅ TwoSameStringsSameId
✅ TwoStringKeysDifferent