winget-cli

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

WinGetUtilLog.cs (1046B)


      1 // -----------------------------------------------------------------------------
      2 // <copyright file="WinGetUtilLog.cs" company="Microsoft Corporation">
      3 //     Copyright (c) Microsoft Corporation. Licensed under the MIT License.
      4 // </copyright>
      5 // -----------------------------------------------------------------------------
      6 
      7 namespace AppInstallerCLIE2ETests.WinGetUtil
      8 {
      9     using System.IO;
     10     using AppInstallerCLIE2ETests.Helpers;
     11     using NUnit.Framework;
     12 
     13     /// <summary>
     14     /// Test winget util log.
     15     /// </summary>
     16     public class WinGetUtilLog
     17     {
     18         /// <summary>
     19         /// Test logging functions.
     20         /// </summary>
     21         [Test]
     22         public void WinGetUtil_Logging()
     23         {
     24             string filePath = TestCommon.GetRandomTestFile(".log");
     25 
     26             // Init logging
     27             WinGetUtilWrapper.WinGetLoggingInit(filePath);
     28             Assert.True(File.Exists(filePath));
     29 
     30             // Terminate logging
     31             WinGetUtilWrapper.WinGetLoggingTerm(filePath);
     32         }
     33     }
     34 }