Exemplo n.º 1
0
        /// <summary>
        /// <para>Initial method to start new User Story and BDD syntax.</para>
        /// <para>Uses test method name as the 'I Want' part of the User Story syntax.</para>
        /// <para>Follow this 'SoThat' with the 'As' to specify the 'As A' part of the User Story syntax.</para>
        /// </summary>
        /// <param name="businessValue">Supply an enumerator that describes the business values for the User Stories</param>
        /// <returns>Fluent interface providing BDD Given, When, Then syntax</returns>
        protected IBase SoThat(TBusinessValueEnum businessValue)
        {
            var loggerFactory = LoggerFactory ?? ConfigureDefaultLoggersFactory;
            var loggers       = new Loggers();

            loggers.AddRange(loggerFactory());
            loggers.SetStartTextsToEmphasise("I want", "So that", "As", "Given", "When", "Then", "And");
            return(Behaviour.SoThat(businessValue.ToString(), ApplicationLayer(), null, loggers));
        }
Exemplo n.º 2
0
        public RemoteLogger(params IRemoteLogger[] remoteLoggers)
        {
            Loggers.AddRange(
                new IRemoteLogger[]
            {
                new ExceptionlessRemoteLogger()
            });

            if (remoteLoggers.Any())
            {
                Loggers.AddRange(remoteLoggers);
            }
        }
Exemplo n.º 3
0
 public CakePublishManager(ClickTwiceManager mgr) : base(mgr.ProjectFilePath)
 {
     Environment             = mgr.Environment;
     FileSystem              = mgr.FileSystem;
     Runner                  = mgr.ProcessRunner;
     ToolLocator             = mgr.ToolLocator;
     BuildAction             = mgr.BuildAction ?? DefaultBuildAction;
     CleanOutputOnCompletion = mgr.CleanOutput;
     Configuration           = mgr.Configuration;
     Platform                = mgr.Platform;
     InputHandlers           = mgr.InputHandlers;
     OutputHandlers          = mgr.OutputHandlers;
     Loggers.AddRange(mgr.Loggers);
     ErrorAction = mgr.ErrorAction;
     if (!string.IsNullOrWhiteSpace(mgr.PublishVersion))
     {
         AdditionalProperties.Add("ApplicationVersion", mgr.PublishVersion);
     }
 }
Exemplo n.º 4
0
 /// <summary>Adds the specified new loggers.</summary>
 /// <param name="newLoggers">The new loggers.</param>
 public void Add(params ILogger[] newLoggers) => Loggers.AddRange(newLoggers);