コード例 #1
0
        /// <summary>
        /// Configures the specification to execute a behavior config before the action on the subject
        /// is executed (<see cref="Because"/>).
        /// </summary>
        /// <typeparam name="TBehaviorConfig">Specifies the type of the config to be executed.</typeparam>
        /// <returns>The behavior config instance.</returns>
        /// <remarks>
        /// The class specified by <typeparamref name="TBehaviorConfig"/>
        /// needs to have private fields assigned with either <see cref="OnEstablish"/>
        /// or <see cref="OnCleanup"/> delegates.
        /// </remarks>
        protected static TBehaviorConfig With <TBehaviorConfig>() where TBehaviorConfig : new()
        {
            GuardAgainstStaticContext();

            return(_specificationController.With <TBehaviorConfig>());
        }
コード例 #2
0
 protected static TBehaviorConfig With <TBehaviorConfig>() where TBehaviorConfig : new()
 {
     return(specificationController.With <TBehaviorConfig>());
 }