Test() public method

Tests the main logic and does the following: Build the source files which specified in the input directory Create a local NuGet package
public Test ( string directory ) : System.Threading.Tasks.Task
directory string
return System.Threading.Tasks.Task
示例#1
0
 /// <summary>
 /// Tests the main logic behave as expected. <see cref="NuGetApiPublisher.Test"/> for more details.
 /// </summary>
 async Task TestAsync(IEnumerable <DiscoveryItem> apis)
 {
     foreach (var item in apis)
     {
         var publisher = new NuGetApiPublisher(item)
         {
             TemplateDirectory = TemplateDirectory,
         };
         try
         {
             await publisher.Test(options.ApisDirectory);
         }
         catch (Exception ex)
         {
             TraceSource.TraceEvent(TraceEventType.Error, "{0}\t Exception [{1}] occurred", item, ex.Message);
         }
     }
 }
 /// <summary>
 /// Tests the main logic behave as expected. <see cref="NuGetApiPublisher.Test"/> for more details.
 /// </summary>
 async Task TestAsync(IEnumerable<DiscoveryItem> apis)
 {
     foreach (var item in apis)
     {
         var publisher = new NuGetApiPublisher(item)
             {
                 TemplateDirectory = TemplateDirectory,
             };
         try
         {
             await publisher.Test(options.ApisDirectory);
         }
         catch (Exception ex)
         {
             TraceSource.TraceEvent(TraceEventType.Error, "{0}\t Exception [{1}] occurred", item, ex.Message);
         }
     }
 }