Example #1
0
        public WhenBuilder Performs <TBuilder, TArtifact1>(
            Action <TBuilder, TArtifact1> config = null,
            Func <TArtifact1, bool> predicate1   = null)
            where TBuilder : IActionBuilder, new()
        {
            Context.AddAction(new LazyAction <TBuilder, TArtifact1>(config, predicate1));

            return(this);
        }
Example #2
0
        public GivenBuilder HasPerformed <TBuilder, TArtifact1, TArtifact2>(
            Action <TBuilder, TArtifact1, TArtifact2> config = null,
            Func <TArtifact1, bool> predicate1 = null,
            Func <TArtifact2, bool> predicate2 = null
            )
            where TBuilder : IActionBuilder, new()
        {
            Context.AddAction(new LazyAction <TBuilder, TArtifact1, TArtifact2>(config, predicate1, predicate2));

            return(this);
        }
Example #3
0
        public WhenBuilder Performs <T>(Action <T> config = null)
            where T : IActionBuilder, new()
        {
            var builder = new T();

            config?.Invoke(builder);

            Context.AddAction(builder.Build());

            return(this);
        }
Example #4
0
        public GivenBuilder HasPerformed <TBuilder>(Action <TBuilder> config = null)
            where TBuilder : IActionBuilder, new()
        {
            var builder = new TBuilder();

            config?.Invoke(builder);

            Context.AddAction(builder.Build());

            return(this);
        }