BaseCommand.cs (1524B)
1 // ----------------------------------------------------------------------------- 2 // <copyright file="BaseCommand.cs" company="Microsoft Corporation"> 3 // Copyright (c) Microsoft Corporation. Licensed under the MIT License. 4 // </copyright> 5 // ----------------------------------------------------------------------------- 6 7 namespace AppInstallerCLIE2ETests 8 { 9 using AppInstallerCLIE2ETests.Helpers; 10 using NUnit.Framework; 11 12 /// <summary> 13 /// Base command. 14 /// </summary> 15 public class BaseCommand 16 { 17 /// <summary> 18 /// Set up. 19 /// </summary> 20 [OneTimeSetUp] 21 public void BaseSetup() 22 { 23 this.ResetTestSource(); 24 } 25 26 /// <summary> 27 /// Tear down. 28 /// </summary> 29 [OneTimeTearDown] 30 public void BaseTeardown() 31 { 32 TestCommon.TearDownTestSource(); 33 } 34 35 /// <summary> 36 /// Reset test source. 37 /// </summary> 38 /// <param name="useGroupPolicyForTestSource">Use group policy from test source.</param> 39 public void ResetTestSource(bool useGroupPolicyForTestSource = false) 40 { 41 // TODO: If/when cert pinning is implemented on the packaged index source, useGroupPolicyForTestSource should be set to default true 42 // to enable testing it by default. Until then, leaving this here... 43 TestCommon.SetupTestSource(useGroupPolicyForTestSource); 44 } 45 } 46 }