in FunctionsSdkE2ETests/FunctionsSdkE2ETests/E2ETests.cs [158:192]
private void RunBasicValidation(string solutionName)
{
string solutionFile = solutionName + ".sln";
string workingDir = FindContainingDirectory(solutionFile);
string projectDir = Path.Combine(workingDir, solutionName);
CleanBinFolders(projectDir);
RunDotNet("restore", workingDir, solutionFile);
RunDotNet("clean", workingDir, solutionFile);
RunDotNet("build", workingDir, solutionFile);
ValidateExtensionsJsonRecursive(projectDir, 1, expectedFolder: _expectedBinFolder,
t =>
{
return t["name"].ToString() == "AzureStorage"
&& t["typeName"].ToString() == "Microsoft.Azure.WebJobs.Extensions.Storage.AzureStorageWebJobsStartup, Microsoft.Azure.WebJobs.Extensions.Storage, Version=3.0.10.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
},
t =>
{
return t["name"].ToString() == "Startup"
&& t["typeName"].ToString() == $"{solutionName}.Startup, {solutionName}, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null";
});
// The tests include one auto-created and one manually-created function.json file. The build should generate both into the output folder.
string projectFolder = Path.GetDirectoryName(projectDir);
string projectBinDir = Path.Combine(projectDir, solutionName, "bin");
IEnumerable<string> functionJsonFilePaths = Directory.EnumerateFiles(Path.Combine(projectBinDir), "function.json", new EnumerationOptions { RecurseSubdirectories = true });
// Comment out until 3.0.10 and 1.0.38 are released
// Assert.Collection(functionJsonFilePaths,
// p => Assert.EndsWith("\\Function1\\function.json", p),
// p => Assert.EndsWith("\\Function2\\function.json", p));
}