コード例 #1
0
 public void ConfigurationFromFluentInterfaceConfigurationTest()
 {
     _task.Configuration("Release");
     _task.ExecuteVoid(Context.Object);
     Assert.Equal(2, _task.Arguments.Count);
     Assert.Equal("-c", _task.Arguments[0]);
     Assert.Equal("Release", _task.Arguments[1]);
 }
コード例 #2
0
        public DotnetPublishTask Publish(string projectName = null, string workingFolder = null, string configuration = null)
        {
            DotnetPublishTask task = Context.CreateTask <DotnetPublishTask>();

            if (!string.IsNullOrEmpty(workingFolder))
            {
                task.WorkingFolder(workingFolder);
            }

            if (!string.IsNullOrEmpty(projectName))
            {
                task.Project(projectName);
            }

            if (!string.IsNullOrEmpty(configuration))
            {
                task.Configuration(configuration);
            }

            return(task);
        }