Пример #1
0
        public void SetUp()
        {
            var log = this.CreateLogger();

            wasCalled = false;
            SafelyTry.Action(() => WasCalled(), log);
        }
        public void SetUp()
        {
            var log = this.CreateLogger();

            testObject = new TestObject();
            SafelyTry.Action(testObject, x => x.Call(), log);
        }
Пример #3
0
        /// <inheritdoc />
        public void AfterTest(ITest testDetails)
        {
            var currentContext = TestContext.CurrentContext;

            if (currentContext.Result.Outcome.Status == TestStatus.Failed)
            {
                SafelyTry.Action(() => SaveScreenshotForEachTab(currentContext, "_post"));
            }

            SafelyTry.Action(() => webDriver.Close());
            SafelyTry.Action(() => webDriver.Quit());
            SafelyTry.Dispose(webDriver);
        }
Пример #4
0
        public void SetUp()
        {
            var log = this.CreateLogger();

            SafelyTry.Action(() => ThrowsException(), log);
        }