protected override void RunDiscovery(IDiscoveryContext context)
        {
            context.EnterCollectionItemPath();

            context.EnterScope <TItem>(ScopeId);

            context.LeavePath();
        }
Beispiel #2
0
        public void Discover(IDiscoveryContext context)
        {
            context.EnterPath(Path);

            if (!ErrorId.HasValue || ErrorMode == ErrorMode.Append)
            {
                RunDiscovery(context);
            }

            if (ErrorId.HasValue)
            {
                context.AddError(ErrorId.Value);
            }

            context.LeavePath();
        }
Beispiel #3
0
        public static void ShouldDiscover <T>(this ICommandScope <T> @this, IDiscoveryContext context, Action <IDiscoveryContext> callsAssertions)
        {
            @this.Discover(context);

            Received.InOrder(() =>
            {
                context.EnterPath(Arg.Is(@this.Path));

                if ([email protected] || @this.ErrorMode == ErrorMode.Append)
                {
                    callsAssertions(context);
                }

                if (@this.ErrorId.HasValue)
                {
                    context.AddError(Arg.Is(@this.ErrorId.Value));
                }

                context.LeavePath();
            });
        }