Exemplo n.º 1
0
        private static AzureFunctionsHttpProject CreateNew(TestConfig configuration, ITestOutputHelper outputWriter)
        {
            var project = new AzureFunctionsHttpProject(configuration, outputWriter);

            project.CreateNewProject(new ProjectOptions());
            project.AddStorageAccount();

            return(project);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates a new temporary project based on the Azure Functions HTTP trigger project template.
        /// </summary>
        /// <param name="configuration">The configuration to control the hosting of the to-be-created project.</param>
        /// <param name="options">The project options to control the functionality of the to-be-created project from this template.</param>
        /// <param name="outputWriter">The output logger to write telemetry information during the creation and startup process.</param>
        /// <returns>
        ///     An Azure Functions HTTP trigger project with a full set of endpoint services to interact with.
        /// </returns>
        /// <exception cref="ArgumentNullException">
        ///     Thrown when the <paramref name="configuration"/>, <paramref name="options"/> or <paramref name="outputWriter"/> is <c>null</c>.
        /// </exception>
        public static AzureFunctionsHttpProject CreateNew(TestConfig configuration, AzureFunctionsHttpProjectOptions options, ITestOutputHelper outputWriter)
        {
            Guard.NotNull(configuration, nameof(configuration), "Requires a configuration instance to control the hosting of the to-be-created project");
            Guard.NotNull(options, nameof(options), "Requires a set of project argument options to create the Azure Functions HTTP trigger project");
            Guard.NotNull(outputWriter, nameof(outputWriter), "Requires a test logger to write diagnostic information during the creation and startup process");

            var project = new AzureFunctionsHttpProject(configuration, outputWriter);

            project.CreateNewProject(options);
            project.AddStorageAccount();

            return(project);
        }