public void TestMethodSetup() { AdalTests.InitializeTest(); StsType stsType = this.GetStsTypeFromContext(); Sts = SetupStsService(stsType); }
private async Task RunTestSyncOrAsync(TestMethod testMethod, TestMethodAsync testMethodAsync, StsType stsType) { this.AppendText(string.Format("{0}: ", (testMethod != NullTestMethod) ? testMethod.Method.Name : testMethodAsync.Method.Name)); try { Sts sts = StsFactory.CreateSts(stsType); AdalTests.InitializeTest(); AdalTests.EndBrowserDialogSession(); if (testMethod != NullTestMethod) { testMethod(sts); } if (testMethodAsync != NullTestMethodAsync) { await testMethodAsync(sts); } this.AppendText("PASSED.\n", Color.Green); } catch (AssertFailedException) { this.AppendText("FAILED!\n", Color.Red); } catch (Exception ex) { this.AppendText(string.Format("FAILED with exception '{0}'!\n", ex), Color.Red); } }
public void TestMethodSetup() { AdalTests.InitializeTest(); StsType stsType = this.GetStsTypeFromContext(); try { AuthenticationContextProxy.CallSync = bool.Parse((string)TestContext.DataRow["CallSync"]); } catch (ArgumentException) { AuthenticationContextProxy.CallSync = false; } Sts = SetupStsService(stsType); RecorderSettings.SetMockModeByTestContext(TestContext); AdalTests.EndBrowserDialogSession(); }
public void TestMethodSetup() { AdalTests.InitializeTest(); SetReplayerNetworkPlugin(); }