Skip to content

Instantly share code, notes, and snippets.

View HowardvanRooijen's full-sized avatar

Howard van Rooijen HowardvanRooijen

View GitHub Profile
[Binding]
public class NUnit3Hooks
{
[BeforeFeature("workingdirectory_feature")]
public static void ChangeWorkingDirectory()
{
FeatureContext.Current.Add("NUnit3Hooks.OldWorkingDirectory", Directory.GetCurrentDirectory());
Directory.SetCurrentDirectory(TestContext.CurrentContext.TestDirectory);
}
[AfterFeature("workingdirectory_feature")]
$svcprincipal = New-AzureRmADServicePrincipal -ApplicationId $AadApplicationId
$AadApplicationId = $azureAdApplication.ApplicationId
Set-AzureRmContext -Tenant $NewTenantId
$TenantId = (Get-AzureRmContext).Tenant.Id
$AppAuthenticationConnectionString = RunAs=App;AppId=$AadApplicationId;TenantId=$TenantId;AppKey=$Password